src/LiveDevelopment/LiveDevelopment.js
function onActiveEditorChange(event, current, previous) {
        if (previous && previous.document &&
                CSSUtils.isCSSPreprocessorFile(previous.document.file.fullPath)) {
            var prevDocUrl = _server && _server.pathToUrl(previous.document.file.fullPath);

            if (_relatedDocuments && _relatedDocuments[prevDocUrl]) {
                _closeRelatedDocument(_relatedDocuments[prevDocUrl]);
            }
        }
        if (current && current.document &&
                CSSUtils.isCSSPreprocessorFile(current.document.file.fullPath)) {
            var docUrl = _server && _server.pathToUrl(current.document.file.fullPath);
            _styleSheetAdded(null, docUrl);
        }
    }
function onActiveEditorChange(event, current, previous) {
        if (previous && previous.document &&
                CSSUtils.isCSSPreprocessorFile(previous.document.file.fullPath)) {
            var prevDocUrl = _server && _server.pathToUrl(previous.document.file.fullPath);

            if (_relatedDocuments && _relatedDocuments[prevDocUrl]) {
                _closeRelatedDocument(_relatedDocuments[prevDocUrl]);
            }
        }
        if (current && current.document &&
                CSSUtils.isCSSPreprocessorFile(current.document.file.fullPath)) {
            var docUrl = _server && _server.pathToUrl(current.document.file.fullPath);
            _styleSheetAdded(null, docUrl);
        }
    }
function onActiveEditorChange ( event , current , previous ) { if ( previous && previous . document && CSSUtils . isCSSPreprocessorFile ( previous . document . file . fullPath ) ) { var prevDocUrl = _server && _server . pathToUrl ( previous . document . file . fullPath ) ; if ( _relatedDocuments && _relatedDocuments [ prevDocUrl ] ) { _closeRelatedDocument ( _relatedDocuments [ prevDocUrl ] ) ; } } if ( current && current . document && CSSUtils . isCSSPreprocessorFile ( current . document . file . fullPath ) ) { var docUrl = _server && _server . pathToUrl ( current . document . file . fullPath ) ; _styleSheetAdded ( null , docUrl ) ; } }
If the current editor is for a CSS preprocessor file, then add it to the style sheet
so that we can track cursor positions in the editor to show live preview highlighting.
For normal CSS we only do highlighting from files we know for sure are referenced by the
current live preview document, but for preprocessors we just assume that any preprocessor
file you edit is probably related to the live preview.

@param {Event} event (unused)
@param {Editor} current Current editor
@param {Editor} previous Previous editor
If the current editor is for a CSS preprocessor file then add it to the style sheet so that we can track cursor positions in the editor to show live preview highlighting . For normal CSS we only do highlighting from files we know for sure are referenced by the current live preview document but for preprocessors we just assume that any preprocessor file you edit is probably related to the live preview .