Ejemplo n.º 1
0
 /**
  * Update DocumentManager listeners.
  */
 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");
     }
 }
Ejemplo n.º 2
0
 /**
  * Removes the sort listeners.
  * @private
  */
 function _removeListeners() {
     MainViewManager.off(".sort");
 }