src/plugin/coreplugins/GuidCollider/GuidCollider.js
function (node, next) {
                var oldGuid = self.core.getGuid(node),
                    newGuid;
                if (guids.hasOwnProperty(oldGuid)) {
                    hasCollision = true;
                    if (currentConfiguration.checkOnly) {
                        self.createMessage(node, 'guid collision with: ' + guids[oldGuid]);
                    } else {
                        newGuid = GUID();
                        self.core.setGuid(node, newGuid);
                        self.createMessage(node, 'guid changed [' + oldGuid + ']->[' + newGuid + ']');
                        guids[newGuid] = self.core.getPath(node);
                    }
                } else {
                    guids[oldGuid] = self.core.getPath(node);
                }
                next(null);
            }
function (node, next) {
                var oldGuid = self.core.getGuid(node),
                    newGuid;
                if (guids.hasOwnProperty(oldGuid)) {
                    hasCollision = true;
                    if (currentConfiguration.checkOnly) {
                        self.createMessage(node, 'guid collision with: ' + guids[oldGuid]);
                    } else {
                        newGuid = GUID();
                        self.core.setGuid(node, newGuid);
                        self.createMessage(node, 'guid changed [' + oldGuid + ']->[' + newGuid + ']');
                        guids[newGuid] = self.core.getPath(node);
                    }
                } else {
                    guids[oldGuid] = self.core.getPath(node);
                }
                next(null);
            }
function ( node , next ) { var oldGuid = self . core . getGuid ( node ) , newGuid ; if ( guids . hasOwnProperty ( oldGuid ) ) { hasCollision = true ; if ( currentConfiguration . checkOnly ) { self . createMessage ( node , 'guid collision with: ' + guids [ oldGuid ] ) ; } else { newGuid = GUID ( ) ; self . core . setGuid ( node , newGuid ) ; self . createMessage ( node , 'guid changed [' + oldGuid + ']->[' + newGuid + ']' ) ; guids [ newGuid ] = self . core . getPath ( node ) ; } } else { guids [ oldGuid ] = self . core . getPath ( node ) ; } next ( null ) ; }
Use self to access core, project, result, logger etc from PluginBase. These are all instantiated at this point.
Use self to access core project result logger etc from PluginBase . These are all instantiated at this point .