@@ -13,9 +13,9 @@ import { Registry } from 'vs/platform/registry/common/platform';
13
13
import { IWorkbenchContributionsRegistry , Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions' ;
14
14
import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle' ;
15
15
16
- /** INavigatableContainer represents a logical container composed of widgets that can
16
+ /** INavigableContainer represents a logical container composed of widgets that can
17
17
be navigated back and forth with key shortcuts */
18
- interface INavigatableContainer {
18
+ interface INavigableContainer {
19
19
/**
20
20
* The container may coomposed of multiple parts that share no DOM ancestor
21
21
* (e.g., the main body and filter box of MarkersView may be separated).
@@ -54,28 +54,28 @@ function handleFocusEventsGroup(group: readonly IFocusNotifier[], handler: (isFo
54
54
) ) ) ;
55
55
}
56
56
57
- const NavigatableContainerFocusedContextKey = new RawContextKey < boolean > ( 'navigatableContainerFocused ' , false ) ;
57
+ const NavigableContainerFocusedContextKey = new RawContextKey < boolean > ( 'navigableContainerFocused ' , false ) ;
58
58
59
- class NavigatableContainerManager implements IDisposable {
60
- private static INSTANCE : NavigatableContainerManager | undefined ;
59
+ class NavigableContainerManager implements IDisposable {
60
+ private static INSTANCE : NavigableContainerManager | undefined ;
61
61
62
- private readonly containers = new Set < INavigatableContainer > ( ) ;
63
- private lastContainer : INavigatableContainer | undefined ;
62
+ private readonly containers = new Set < INavigableContainer > ( ) ;
63
+ private lastContainer : INavigableContainer | undefined ;
64
64
private focused : IContextKey < boolean > ;
65
65
66
66
67
67
constructor ( @IContextKeyService contextKeyService : IContextKeyService ) {
68
- this . focused = NavigatableContainerFocusedContextKey . bindTo ( contextKeyService ) ;
69
- NavigatableContainerManager . INSTANCE = this ;
68
+ this . focused = NavigableContainerFocusedContextKey . bindTo ( contextKeyService ) ;
69
+ NavigableContainerManager . INSTANCE = this ;
70
70
}
71
71
72
72
dispose ( ) : void {
73
73
this . containers . clear ( ) ;
74
74
this . focused . reset ( ) ;
75
- NavigatableContainerManager . INSTANCE = undefined ;
75
+ NavigableContainerManager . INSTANCE = undefined ;
76
76
}
77
77
78
- static register ( container : INavigatableContainer ) : IDisposable {
78
+ static register ( container : INavigableContainer ) : IDisposable {
79
79
const instance = this . INSTANCE ;
80
80
if ( ! instance ) {
81
81
return Disposable . None ;
@@ -102,31 +102,31 @@ class NavigatableContainerManager implements IDisposable {
102
102
) ;
103
103
}
104
104
105
- static getActive ( ) : INavigatableContainer | undefined {
105
+ static getActive ( ) : INavigableContainer | undefined {
106
106
return this . INSTANCE ?. lastContainer ;
107
107
}
108
108
}
109
109
110
- export function registerNavigatableContainer ( container : INavigatableContainer ) : IDisposable {
111
- return NavigatableContainerManager . register ( container ) ;
110
+ export function registerNavigableContainer ( container : INavigableContainer ) : IDisposable {
111
+ return NavigableContainerManager . register ( container ) ;
112
112
}
113
113
114
114
Registry . as < IWorkbenchContributionsRegistry > ( WorkbenchExtensions . Workbench )
115
- . registerWorkbenchContribution ( NavigatableContainerManager , LifecyclePhase . Starting ) ;
115
+ . registerWorkbenchContribution ( NavigableContainerManager , LifecyclePhase . Starting ) ;
116
116
117
117
KeybindingsRegistry . registerCommandAndKeybindingRule ( {
118
118
id : 'widgetNavigation.focusPrevious' ,
119
119
weight : KeybindingWeight . WorkbenchContrib ,
120
120
when : ContextKeyExpr . and (
121
- NavigatableContainerFocusedContextKey ,
121
+ NavigableContainerFocusedContextKey ,
122
122
ContextKeyExpr . or (
123
123
WorkbenchListFocusContextKey ?. negate ( ) ,
124
124
WorkbenchListScrollAtTopContextKey ,
125
125
)
126
126
) ,
127
127
primary : KeyMod . CtrlCmd | KeyCode . UpArrow ,
128
128
handler : ( ) => {
129
- const activeContainer = NavigatableContainerManager . getActive ( ) ;
129
+ const activeContainer = NavigableContainerManager . getActive ( ) ;
130
130
activeContainer ?. focusPreviousWidget ( ) ;
131
131
}
132
132
} ) ;
@@ -135,15 +135,15 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
135
135
id : 'widgetNavigation.focusNext' ,
136
136
weight : KeybindingWeight . WorkbenchContrib ,
137
137
when : ContextKeyExpr . and (
138
- NavigatableContainerFocusedContextKey ,
138
+ NavigableContainerFocusedContextKey ,
139
139
ContextKeyExpr . or (
140
140
WorkbenchListFocusContextKey ?. negate ( ) ,
141
141
WorkbenchListScrollAtBottomContextKey ,
142
142
)
143
143
) ,
144
144
primary : KeyMod . CtrlCmd | KeyCode . DownArrow ,
145
145
handler : ( ) => {
146
- const activeContainer = NavigatableContainerManager . getActive ( ) ;
146
+ const activeContainer = NavigableContainerManager . getActive ( ) ;
147
147
activeContainer ?. focusNextWidget ( ) ;
148
148
}
149
149
} ) ;
0 commit comments