@@ -24,7 +24,7 @@ import { Range } from 'vs/editor/common/core/range';
2424import { IPosition } from 'vs/editor/common/core/position' ;
2525import { MenuId } from 'vs/platform/actions/common/actions' ;
2626
27- const _ctxHasCompletionItemProvider = new RawContextKey < boolean > ( 'editorHasCallHierarchyProvider' , false ) ;
27+ const _ctxHasCallHierarchyProvider = new RawContextKey < boolean > ( 'editorHasCallHierarchyProvider' , false ) ;
2828const _ctxCallHierarchyVisible = new RawContextKey < boolean > ( 'callHierarchyVisible' , false ) ;
2929
3030class CallHierarchyController implements IEditorContribution {
@@ -52,7 +52,7 @@ class CallHierarchyController implements IEditorContribution {
5252 @IInstantiationService private readonly _instantiationService : IInstantiationService ,
5353 ) {
5454 this . _ctxIsVisible = _ctxCallHierarchyVisible . bindTo ( this . _contextKeyService ) ;
55- this . _ctxHasProvider = _ctxHasCompletionItemProvider . bindTo ( this . _contextKeyService ) ;
55+ this . _ctxHasProvider = _ctxHasCallHierarchyProvider . bindTo ( this . _contextKeyService ) ;
5656 this . _dispoables . add ( Event . any < any > ( _editor . onDidChangeModel , _editor . onDidChangeModelLanguage , CallHierarchyProviderRegistry . onDidChange ) ( ( ) => {
5757 this . _ctxHasProvider . set ( _editor . hasModel ( ) && CallHierarchyProviderRegistry . has ( _editor . getModel ( ) ) ) ;
5858 } ) ) ;
@@ -172,8 +172,7 @@ registerEditorAction(class extends EditorAction {
172172 primary : KeyMod . Shift + KeyMod . Alt + KeyCode . KEY_H
173173 } ,
174174 precondition : ContextKeyExpr . and (
175- _ctxCallHierarchyVisible . negate ( ) ,
176- _ctxHasCompletionItemProvider ,
175+ _ctxHasCallHierarchyProvider ,
177176 PeekContext . notInPeekEditor
178177 )
179178 } ) ;
0 commit comments