src/language/CodeInspection.js
function updateListeners() {
        if (_enabled) {
            // register our event listeners
            MainViewManager
                .on("currentFileChange.codeInspection", function () {
                    run();
                });
            DocumentManager
                .on("currentDocumentLanguageChanged.codeInspection", function () {
                    run();
                })
                .on("documentSaved.codeInspection documentRefreshed.codeInspection", function (event, document) {
                    if (document === DocumentManager.getCurrentDocument()) {
                        run();
                    }
                });
        } else {
            DocumentManager.off(".codeInspection");
            MainViewManager.off(".codeInspection");
        }
    }
function updateListeners() {
        if (_enabled) {
            // register our event listeners
            MainViewManager
                .on("currentFileChange.codeInspection", function () {
                    run();
                });
            DocumentManager
                .on("currentDocumentLanguageChanged.codeInspection", function () {
                    run();
                })
                .on("documentSaved.codeInspection documentRefreshed.codeInspection", function (event, document) {
                    if (document === DocumentManager.getCurrentDocument()) {
                        run();
                    }
                });
        } else {
            DocumentManager.off(".codeInspection");
            MainViewManager.off(".codeInspection");
        }
    }
function updateListeners ( ) { if ( _enabled ) { // register our event listeners MainViewManager . on ( "currentFileChange.codeInspection" , function ( ) { run ( ) ; } ) ; DocumentManager . on ( "currentDocumentLanguageChanged.codeInspection" , function ( ) { run ( ) ; } ) . on ( "documentSaved.codeInspection documentRefreshed.codeInspection" , function ( event , document ) { if ( document === DocumentManager . getCurrentDocument ( ) ) { run ( ) ; } } ) ; } else { DocumentManager . off ( ".codeInspection" ) ; MainViewManager . off ( ".codeInspection" ) ; } }
Update DocumentManager listeners.
Update DocumentManager listeners .