function EditorModeContext(editor, contextKeyService) {
            var _this = _super.call(this) || this;
            _this._editor = editor;
            _this._langId = editorContextKeys_1.EditorContextKeys.languageId.bindTo(contextKeyService);
            _this._hasCompletionItemProvider = editorContextKeys_1.EditorContextKeys.hasCompletionItemProvider.bindTo(contextKeyService);
            _this._hasCodeActionsProvider = editorContextKeys_1.EditorContextKeys.hasCodeActionsProvider.bindTo(contextKeyService);
            _this._hasCodeLensProvider = editorContextKeys_1.EditorContextKeys.hasCodeLensProvider.bindTo(contextKeyService);
            _this._hasDefinitionProvider = editorContextKeys_1.EditorContextKeys.hasDefinitionProvider.bindTo(contextKeyService);
            _this._hasImplementationProvider = editorContextKeys_1.EditorContextKeys.hasImplementationProvider.bindTo(contextKeyService);
            _this._hasTypeDefinitionProvider = editorContextKeys_1.EditorContextKeys.hasTypeDefinitionProvider.bindTo(contextKeyService);
            _this._hasHoverProvider = editorContextKeys_1.EditorContextKeys.hasHoverProvider.bindTo(contextKeyService);
            _this._hasDocumentHighlightProvider = editorContextKeys_1.EditorContextKeys.hasDocumentHighlightProvider.bindTo(contextKeyService);
            _this._hasDocumentSymbolProvider = editorContextKeys_1.EditorContextKeys.hasDocumentSymbolProvider.bindTo(contextKeyService);
            _this._hasReferenceProvider = editorContextKeys_1.EditorContextKeys.hasReferenceProvider.bindTo(contextKeyService);
            _this._hasRenameProvider = editorContextKeys_1.EditorContextKeys.hasRenameProvider.bindTo(contextKeyService);
            _this._hasDocumentFormattingProvider = editorContextKeys_1.EditorContextKeys.hasDocumentFormattingProvider.bindTo(contextKeyService);
            _this._hasDocumentSelectionFormattingProvider = editorContextKeys_1.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(contextKeyService);
            _this._hasSignatureHelpProvider = editorContextKeys_1.EditorContextKeys.hasSignatureHelpProvider.bindTo(contextKeyService);
            _this._isInWalkThrough = editorContextKeys_1.EditorContextKeys.isInEmbeddedEditor.bindTo(contextKeyService);
            var update = function () { return _this._update(); };
            // update when model/mode changes
            _this._register(editor.onDidChangeModel(update));
            _this._register(editor.onDidChangeModelLanguage(update));
            // update when registries change
            _this._register(modes.SuggestRegistry.onDidChange(update));
            _this._register(modes.CodeActionProviderRegistry.onDidChange(update));
            _this._register(modes.CodeLensProviderRegistry.onDidChange(update));
            _this._register(modes.DefinitionProviderRegistry.onDidChange(update));
            _this._register(modes.ImplementationProviderRegistry.onDidChange(update));
            _this._register(modes.TypeDefinitionProviderRegistry.onDidChange(update));
            _this._register(modes.HoverProviderRegistry.onDidChange(update));
            _this._register(modes.DocumentHighlightProviderRegistry.onDidChange(update));
            _this._register(modes.DocumentSymbolProviderRegistry.onDidChange(update));
            _this._register(modes.ReferenceProviderRegistry.onDidChange(update));
            _this._register(modes.RenameProviderRegistry.onDidChange(update));
            _this._register(modes.DocumentFormattingEditProviderRegistry.onDidChange(update));
            _this._register(modes.DocumentRangeFormattingEditProviderRegistry.onDidChange(update));
            _this._register(modes.SignatureHelpProviderRegistry.onDidChange(update));
            update();
            return _this;
        }
A context key that is set when the editor's text or an editor's widget has focus.