function handleActiveEditorChange(event, current, previous) {
            // Uninstall "languageChanged" event listeners on previous editor's document & put them on current editor's doc
            if (previous) {
                previous.document
                    .off(HintUtils.eventName("languageChanged"));
            }
            if (current) {
                current.document
                    .on(HintUtils.eventName("languageChanged"), function () {
                        // If current doc's language changed, reset our state by treating it as if the user switched to a
                        // different document altogether
                        uninstallEditorListeners(current);
                        installEditorListeners(current);
                    });
            }

            uninstallEditorListeners(previous);
            installEditorListeners(current, previous);
        }
function handleActiveEditorChange(event, current, previous) {
            // Uninstall "languageChanged" event listeners on previous editor's document & put them on current editor's doc
            if (previous) {
                previous.document
                    .off(HintUtils.eventName("languageChanged"));
            }
            if (current) {
                current.document
                    .on(HintUtils.eventName("languageChanged"), function () {
                        // If current doc's language changed, reset our state by treating it as if the user switched to a
                        // different document altogether
                        uninstallEditorListeners(current);
                        installEditorListeners(current);
                    });
            }

            uninstallEditorListeners(previous);
            installEditorListeners(current, previous);
        }
function handleActiveEditorChange ( event , current , previous ) { // Uninstall "languageChanged" event listeners on previous editor's document & put them on current editor's doc if ( previous ) { previous . document . off ( HintUtils . eventName ( "languageChanged" ) ) ; } if ( current ) { current . document . on ( HintUtils . eventName ( "languageChanged" ) , function ( ) { // If current doc's language changed, reset our state by treating it as if the user switched to a // different document altogether uninstallEditorListeners ( current ) ; installEditorListeners ( current ) ; } ) ; } uninstallEditorListeners ( previous ) ; installEditorListeners ( current , previous ) ; }
/*
Handle the activeEditorChange event fired by EditorManager.
Uninstalls the change listener on the previous editor
and installs a change listener on the new editor.

@param {Event} event - editor change event (ignored)
@param {Editor} current - the new current editor context
@param {Editor} previous - the previous editor context
/ * Handle the activeEditorChange event fired by EditorManager . Uninstalls the change listener on the previous editor and installs a change listener on the new editor .
Handle active editor change