@codingame/monaco-vscode-view-common-service-override 4.5.1 → 4.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/vscode/src/vs/base/browser/ui/grid/grid.js +12 -12
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +26 -26
- package/vscode/src/vs/platform/languagePacks/common/localizedStrings.js +4 -3
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +127 -220
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +43 -44
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +7 -30
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +67 -138
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +21 -36
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +26 -27
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +17 -31
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +215 -764
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +27 -42
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +24 -23
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +31 -33
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +51 -54
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +38 -41
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +21 -24
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +2 -5
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +17 -20
- package/vscode/src/vs/workbench/browser/window.js +41 -92
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +41 -78
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +23 -46
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +36 -27
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +14 -15
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +10 -11
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +25 -52
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +55 -87
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +18 -48
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +61 -150
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +15 -70
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +9 -20
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +14 -65
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +38 -113
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +12 -19
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +34 -75
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +16 -37
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +40 -43
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +12 -11
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +24 -61
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +7 -6
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +37 -70
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +23 -46
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +26 -27
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +2 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +50 -52
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +18 -34
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +7 -10
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.js +2 -2
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +45 -46
- package/vscode/src/vs/workbench/services/driver/browser/driver.js +8 -6
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +45 -68
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +95 -98
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +34 -74
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +69 -67
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +52 -47
|
@@ -16,6 +16,7 @@ import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/comm
|
|
|
16
16
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
17
17
|
import { localize2WithPath, localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
18
18
|
|
|
19
|
+
const _moduleId = "vs/workbench/browser/actions/listCommands";
|
|
19
20
|
function ensureDOMFocus(widget) {
|
|
20
21
|
const element = widget?.getHTMLElement();
|
|
21
22
|
if (element && !isActiveElement(element)) {
|
|
@@ -33,7 +34,7 @@ async function updateFocus(widget, updateFocusFn) {
|
|
|
33
34
|
if (selection.length > 1 || !equals(focus, selection) || equals(focus, newFocus)) {
|
|
34
35
|
return;
|
|
35
36
|
}
|
|
36
|
-
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
37
|
+
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown')));
|
|
37
38
|
widget.setSelection(newFocus, fakeKeyboardEvent);
|
|
38
39
|
}
|
|
39
40
|
async function navigate(widget, updateFocusFn) {
|
|
@@ -59,7 +60,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
59
60
|
},
|
|
60
61
|
handler: (accessor, arg2) => {
|
|
61
62
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
62
|
-
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
63
|
+
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown')));
|
|
63
64
|
await widget.focusNext(typeof arg2 === 'number' ? arg2 : 1, false, fakeKeyboardEvent);
|
|
64
65
|
});
|
|
65
66
|
}
|
|
@@ -75,7 +76,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
75
76
|
},
|
|
76
77
|
handler: (accessor, arg2) => {
|
|
77
78
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
78
|
-
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
79
|
+
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown')));
|
|
79
80
|
await widget.focusPrevious(typeof arg2 === 'number' ? arg2 : 1, false, fakeKeyboardEvent);
|
|
80
81
|
});
|
|
81
82
|
}
|
|
@@ -91,7 +92,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
91
92
|
},
|
|
92
93
|
handler: (accessor, arg2) => {
|
|
93
94
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
94
|
-
const fakeKeyboardEvent = ( new KeyboardEvent('keydown', { altKey: true }));
|
|
95
|
+
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown', { altKey: true })));
|
|
95
96
|
await widget.focusNext(typeof arg2 === 'number' ? arg2 : 1, false, fakeKeyboardEvent);
|
|
96
97
|
});
|
|
97
98
|
}
|
|
@@ -107,7 +108,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
107
108
|
},
|
|
108
109
|
handler: (accessor, arg2) => {
|
|
109
110
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
110
|
-
const fakeKeyboardEvent = ( new KeyboardEvent('keydown', { altKey: true }));
|
|
111
|
+
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown', { altKey: true })));
|
|
111
112
|
await widget.focusPrevious(typeof arg2 === 'number' ? arg2 : 1, false, fakeKeyboardEvent);
|
|
112
113
|
});
|
|
113
114
|
}
|
|
@@ -119,7 +120,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
119
120
|
primary: 12 ,
|
|
120
121
|
handler: (accessor) => {
|
|
121
122
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
122
|
-
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
123
|
+
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown')));
|
|
123
124
|
await widget.focusNextPage(fakeKeyboardEvent);
|
|
124
125
|
});
|
|
125
126
|
}
|
|
@@ -131,7 +132,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
131
132
|
primary: 11 ,
|
|
132
133
|
handler: (accessor) => {
|
|
133
134
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
134
|
-
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
135
|
+
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown')));
|
|
135
136
|
await widget.focusPreviousPage(fakeKeyboardEvent);
|
|
136
137
|
});
|
|
137
138
|
}
|
|
@@ -143,7 +144,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
143
144
|
primary: 14 ,
|
|
144
145
|
handler: (accessor) => {
|
|
145
146
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
146
|
-
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
147
|
+
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown')));
|
|
147
148
|
await widget.focusFirst(fakeKeyboardEvent);
|
|
148
149
|
});
|
|
149
150
|
}
|
|
@@ -155,7 +156,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
155
156
|
primary: 13 ,
|
|
156
157
|
handler: (accessor) => {
|
|
157
158
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
158
|
-
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
159
|
+
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown')));
|
|
159
160
|
await widget.focusLast(fakeKeyboardEvent);
|
|
160
161
|
});
|
|
161
162
|
}
|
|
@@ -167,7 +168,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
167
168
|
primary: 512 | 14 ,
|
|
168
169
|
handler: (accessor) => {
|
|
169
170
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
170
|
-
const fakeKeyboardEvent = ( new KeyboardEvent('keydown', { altKey: true }));
|
|
171
|
+
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown', { altKey: true })));
|
|
171
172
|
await widget.focusFirst(fakeKeyboardEvent);
|
|
172
173
|
});
|
|
173
174
|
}
|
|
@@ -179,7 +180,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
179
180
|
primary: 512 | 13 ,
|
|
180
181
|
handler: (accessor) => {
|
|
181
182
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
182
|
-
const fakeKeyboardEvent = ( new KeyboardEvent('keydown', { altKey: true }));
|
|
183
|
+
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown', { altKey: true })));
|
|
183
184
|
await widget.focusLast(fakeKeyboardEvent);
|
|
184
185
|
});
|
|
185
186
|
}
|
|
@@ -205,7 +206,7 @@ function expandMultiSelection(focused, previousFocus) {
|
|
|
205
206
|
return;
|
|
206
207
|
}
|
|
207
208
|
const selection = list.getSelection();
|
|
208
|
-
const fakeKeyboardEvent = ( new KeyboardEvent('keydown', { shiftKey: true }));
|
|
209
|
+
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown', { shiftKey: true })));
|
|
209
210
|
if (selection && selection.indexOf(focus) >= 0) {
|
|
210
211
|
list.setSelection(selection.filter(s => s !== previousFocus), fakeKeyboardEvent);
|
|
211
212
|
}
|
|
@@ -217,10 +218,10 @@ function expandMultiSelection(focused, previousFocus) {
|
|
|
217
218
|
function revealFocusedStickyScroll(tree, postRevealAction) {
|
|
218
219
|
const focus = tree.getStickyScrollFocus();
|
|
219
220
|
if (focus.length === 0) {
|
|
220
|
-
throw new Error(`StickyScroll has no focus`);
|
|
221
|
+
throw ( (new Error(`StickyScroll has no focus`)));
|
|
221
222
|
}
|
|
222
223
|
if (focus.length > 1) {
|
|
223
|
-
throw new Error(`StickyScroll can only have a single focused item`);
|
|
224
|
+
throw ( (new Error(`StickyScroll can only have a single focused item`)));
|
|
224
225
|
}
|
|
225
226
|
tree.reveal(focus[0]);
|
|
226
227
|
tree.getHTMLElement().focus();
|
|
@@ -230,7 +231,7 @@ function revealFocusedStickyScroll(tree, postRevealAction) {
|
|
|
230
231
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
231
232
|
id: 'list.expandSelectionDown',
|
|
232
233
|
weight: 200 ,
|
|
233
|
-
when: ( ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListSupportsMultiSelectContextKey)),
|
|
234
|
+
when: ( (ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListSupportsMultiSelectContextKey))),
|
|
234
235
|
primary: 1024 | 18 ,
|
|
235
236
|
handler: (accessor, arg2) => {
|
|
236
237
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
@@ -238,7 +239,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
238
239
|
return;
|
|
239
240
|
}
|
|
240
241
|
const previousFocus = widget.getFocus() ? widget.getFocus()[0] : undefined;
|
|
241
|
-
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
242
|
+
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown')));
|
|
242
243
|
widget.focusNext(typeof arg2 === 'number' ? arg2 : 1, false, fakeKeyboardEvent);
|
|
243
244
|
expandMultiSelection(widget, previousFocus);
|
|
244
245
|
const focus = widget.getFocus();
|
|
@@ -251,7 +252,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
251
252
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
252
253
|
id: 'list.expandSelectionUp',
|
|
253
254
|
weight: 200 ,
|
|
254
|
-
when: ( ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListSupportsMultiSelectContextKey)),
|
|
255
|
+
when: ( (ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListSupportsMultiSelectContextKey))),
|
|
255
256
|
primary: 1024 | 16 ,
|
|
256
257
|
handler: (accessor, arg2) => {
|
|
257
258
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
@@ -259,7 +260,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
259
260
|
return;
|
|
260
261
|
}
|
|
261
262
|
const previousFocus = widget.getFocus() ? widget.getFocus()[0] : undefined;
|
|
262
|
-
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
263
|
+
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown')));
|
|
263
264
|
widget.focusPrevious(typeof arg2 === 'number' ? arg2 : 1, false, fakeKeyboardEvent);
|
|
264
265
|
expandMultiSelection(widget, previousFocus);
|
|
265
266
|
const focus = widget.getFocus();
|
|
@@ -272,7 +273,10 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
272
273
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
273
274
|
id: 'list.collapse',
|
|
274
275
|
weight: 200 ,
|
|
275
|
-
when: ( ContextKeyExpr.and(
|
|
276
|
+
when: ( (ContextKeyExpr.and(
|
|
277
|
+
WorkbenchListFocusContextKey,
|
|
278
|
+
(ContextKeyExpr.or(WorkbenchTreeElementCanCollapse, WorkbenchTreeElementHasParent))
|
|
279
|
+
))),
|
|
276
280
|
primary: 15 ,
|
|
277
281
|
mac: {
|
|
278
282
|
primary: 15 ,
|
|
@@ -293,7 +297,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
293
297
|
const parent = tree.getParentElement(focus);
|
|
294
298
|
if (parent) {
|
|
295
299
|
navigate(widget, widget => {
|
|
296
|
-
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
300
|
+
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown')));
|
|
297
301
|
widget.setFocus([parent], fakeKeyboardEvent);
|
|
298
302
|
});
|
|
299
303
|
}
|
|
@@ -369,7 +373,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
369
373
|
const parent = tree.getParentElement(focus);
|
|
370
374
|
if (parent) {
|
|
371
375
|
navigate(widget, widget => {
|
|
372
|
-
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
376
|
+
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown')));
|
|
373
377
|
widget.setFocus([parent], fakeKeyboardEvent);
|
|
374
378
|
});
|
|
375
379
|
}
|
|
@@ -378,7 +382,10 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
378
382
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
379
383
|
id: 'list.expand',
|
|
380
384
|
weight: 200 ,
|
|
381
|
-
when: ( ContextKeyExpr.and(
|
|
385
|
+
when: ( (ContextKeyExpr.and(
|
|
386
|
+
WorkbenchListFocusContextKey,
|
|
387
|
+
(ContextKeyExpr.or(WorkbenchTreeElementCanExpand, WorkbenchTreeElementHasChild))
|
|
388
|
+
))),
|
|
382
389
|
primary: 17 ,
|
|
383
390
|
handler: (accessor) => {
|
|
384
391
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
@@ -397,7 +404,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
397
404
|
const node = widget.getNode(child);
|
|
398
405
|
if (node.visible) {
|
|
399
406
|
navigate(widget, widget => {
|
|
400
|
-
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
407
|
+
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown')));
|
|
401
408
|
widget.setFocus([child], fakeKeyboardEvent);
|
|
402
409
|
});
|
|
403
410
|
}
|
|
@@ -417,7 +424,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
417
424
|
const node = widget.getNode(child);
|
|
418
425
|
if (node.visible) {
|
|
419
426
|
navigate(widget, widget => {
|
|
420
|
-
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
427
|
+
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown')));
|
|
421
428
|
widget.setFocus([child], fakeKeyboardEvent);
|
|
422
429
|
});
|
|
423
430
|
}
|
|
@@ -495,13 +502,13 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
495
502
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
496
503
|
id: 'list.selectAll',
|
|
497
504
|
weight: 200 ,
|
|
498
|
-
when: ( ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListSupportsMultiSelectContextKey)),
|
|
505
|
+
when: ( (ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListSupportsMultiSelectContextKey))),
|
|
499
506
|
primary: 2048 | 31 ,
|
|
500
507
|
handler: (accessor) => {
|
|
501
508
|
const focused = accessor.get(IListService).lastFocusedList;
|
|
502
509
|
if (focused instanceof List || focused instanceof PagedList || focused instanceof Table) {
|
|
503
510
|
const list = focused;
|
|
504
|
-
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
511
|
+
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown')));
|
|
505
512
|
list.setSelection(range(list.length), fakeKeyboardEvent);
|
|
506
513
|
}
|
|
507
514
|
else if (focused instanceof ObjectTree || focused instanceof DataTree || focused instanceof AsyncDataTree) {
|
|
@@ -537,7 +544,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
537
544
|
if (scope && selection.length === newSelection.length) {
|
|
538
545
|
newSelection.unshift(scope);
|
|
539
546
|
}
|
|
540
|
-
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
547
|
+
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown')));
|
|
541
548
|
tree.setSelection(newSelection, fakeKeyboardEvent);
|
|
542
549
|
}
|
|
543
550
|
}
|
|
@@ -600,7 +607,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
600
607
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
601
608
|
id: 'list.clear',
|
|
602
609
|
weight: 200 ,
|
|
603
|
-
when: ( ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListHasSelectionOrFocus)),
|
|
610
|
+
when: ( (ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListHasSelectionOrFocus))),
|
|
604
611
|
primary: 9 ,
|
|
605
612
|
handler: (accessor) => {
|
|
606
613
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
@@ -608,7 +615,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
608
615
|
return;
|
|
609
616
|
}
|
|
610
617
|
const selection = widget.getSelection();
|
|
611
|
-
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
618
|
+
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown')));
|
|
612
619
|
if (selection.length > 1) {
|
|
613
620
|
const useSelectionNavigation = WorkbenchListSelectionNavigation.getValue(widget.contextKeyService);
|
|
614
621
|
if (useSelectionNavigation) {
|
|
@@ -658,7 +665,7 @@ CommandsRegistry.registerCommandAlias('list.toggleFilterOnType', 'list.toggleFin
|
|
|
658
665
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
659
666
|
id: 'list.find',
|
|
660
667
|
weight: 200 ,
|
|
661
|
-
when: ( ContextKeyExpr.and(RawWorkbenchListFocusContextKey, WorkbenchListSupportsFind)),
|
|
668
|
+
when: ( (ContextKeyExpr.and(RawWorkbenchListFocusContextKey, WorkbenchListSupportsFind))),
|
|
662
669
|
primary: 2048 | 36 ,
|
|
663
670
|
secondary: [61 ],
|
|
664
671
|
handler: (accessor) => {
|
|
@@ -673,7 +680,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
673
680
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
674
681
|
id: 'list.closeFind',
|
|
675
682
|
weight: 200 ,
|
|
676
|
-
when: ( ContextKeyExpr.and(RawWorkbenchListFocusContextKey, WorkbenchTreeFindOpen)),
|
|
683
|
+
when: ( (ContextKeyExpr.and(RawWorkbenchListFocusContextKey, WorkbenchTreeFindOpen))),
|
|
677
684
|
primary: 9 ,
|
|
678
685
|
handler: (accessor) => {
|
|
679
686
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
@@ -686,7 +693,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
686
693
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
687
694
|
id: 'list.scrollUp',
|
|
688
695
|
weight: 200 ,
|
|
689
|
-
when: ( ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListScrollAtTopContextKey?.negate())),
|
|
696
|
+
when: ( (ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListScrollAtTopContextKey?.negate()))),
|
|
690
697
|
primary: 2048 | 16 ,
|
|
691
698
|
handler: accessor => {
|
|
692
699
|
const focused = accessor.get(IListService).lastFocusedList;
|
|
@@ -699,10 +706,10 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
699
706
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
700
707
|
id: 'list.scrollDown',
|
|
701
708
|
weight: 200 ,
|
|
702
|
-
when: ( ContextKeyExpr.and(
|
|
709
|
+
when: ( (ContextKeyExpr.and(
|
|
703
710
|
WorkbenchListFocusContextKey,
|
|
704
711
|
WorkbenchListScrollAtBottomContextKey?.negate()
|
|
705
|
-
)),
|
|
712
|
+
))),
|
|
706
713
|
primary: 2048 | 18 ,
|
|
707
714
|
handler: accessor => {
|
|
708
715
|
const focused = accessor.get(IListService).lastFocusedList;
|
|
@@ -741,16 +748,8 @@ registerAction2(class ToggleStickyScroll extends Action2 {
|
|
|
741
748
|
super({
|
|
742
749
|
id: 'tree.toggleStickyScroll',
|
|
743
750
|
title: {
|
|
744
|
-
...( localize2WithPath(
|
|
745
|
-
|
|
746
|
-
'toggleTreeStickyScroll',
|
|
747
|
-
"Toggle Tree Sticky Scroll"
|
|
748
|
-
)),
|
|
749
|
-
mnemonicTitle: ( localizeWithPath(
|
|
750
|
-
'vs/workbench/browser/actions/listCommands',
|
|
751
|
-
{ key: 'mitoggleTreeStickyScroll', comment: ['&& denotes a mnemonic'] },
|
|
752
|
-
"&&Toggle Tree Sticky Scroll"
|
|
753
|
-
)),
|
|
751
|
+
...( localize2WithPath(_moduleId, 0, "Toggle Tree Sticky Scroll")),
|
|
752
|
+
mnemonicTitle: ( localizeWithPath(_moduleId, 1, "&&Toggle Tree Sticky Scroll")),
|
|
754
753
|
},
|
|
755
754
|
category: 'View',
|
|
756
755
|
f1: true
|
|
@@ -8,6 +8,7 @@ import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/p
|
|
|
8
8
|
import { getActiveWindow } from 'vscode/vscode/vs/base/browser/dom';
|
|
9
9
|
import { isAuxiliaryWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
10
10
|
|
|
11
|
+
const _moduleId = "vs/workbench/browser/actions/navigationActions";
|
|
11
12
|
class BaseNavigationAction extends Action2 {
|
|
12
13
|
constructor(options, direction) {
|
|
13
14
|
super(options);
|
|
@@ -142,11 +143,7 @@ registerAction2(class extends BaseNavigationAction {
|
|
|
142
143
|
constructor() {
|
|
143
144
|
super({
|
|
144
145
|
id: 'workbench.action.navigateLeft',
|
|
145
|
-
title: ( localize2WithPath(
|
|
146
|
-
'vs/workbench/browser/actions/navigationActions',
|
|
147
|
-
'navigateLeft',
|
|
148
|
-
'Navigate to the View on the Left'
|
|
149
|
-
)),
|
|
146
|
+
title: ( localize2WithPath(_moduleId, 0, 'Navigate to the View on the Left')),
|
|
150
147
|
category: Categories.View,
|
|
151
148
|
f1: true
|
|
152
149
|
}, 2 );
|
|
@@ -156,11 +153,7 @@ registerAction2(class extends BaseNavigationAction {
|
|
|
156
153
|
constructor() {
|
|
157
154
|
super({
|
|
158
155
|
id: 'workbench.action.navigateRight',
|
|
159
|
-
title: ( localize2WithPath(
|
|
160
|
-
'vs/workbench/browser/actions/navigationActions',
|
|
161
|
-
'navigateRight',
|
|
162
|
-
'Navigate to the View on the Right'
|
|
163
|
-
)),
|
|
156
|
+
title: ( localize2WithPath(_moduleId, 1, 'Navigate to the View on the Right')),
|
|
164
157
|
category: Categories.View,
|
|
165
158
|
f1: true
|
|
166
159
|
}, 3 );
|
|
@@ -170,11 +163,7 @@ registerAction2(class extends BaseNavigationAction {
|
|
|
170
163
|
constructor() {
|
|
171
164
|
super({
|
|
172
165
|
id: 'workbench.action.navigateUp',
|
|
173
|
-
title: ( localize2WithPath(
|
|
174
|
-
'vs/workbench/browser/actions/navigationActions',
|
|
175
|
-
'navigateUp',
|
|
176
|
-
'Navigate to the View Above'
|
|
177
|
-
)),
|
|
166
|
+
title: ( localize2WithPath(_moduleId, 2, 'Navigate to the View Above')),
|
|
178
167
|
category: Categories.View,
|
|
179
168
|
f1: true
|
|
180
169
|
}, 0 );
|
|
@@ -184,11 +173,7 @@ registerAction2(class extends BaseNavigationAction {
|
|
|
184
173
|
constructor() {
|
|
185
174
|
super({
|
|
186
175
|
id: 'workbench.action.navigateDown',
|
|
187
|
-
title: ( localize2WithPath(
|
|
188
|
-
'vs/workbench/browser/actions/navigationActions',
|
|
189
|
-
'navigateDown',
|
|
190
|
-
'Navigate to the View Below'
|
|
191
|
-
)),
|
|
176
|
+
title: ( localize2WithPath(_moduleId, 3, 'Navigate to the View Below')),
|
|
192
177
|
category: Categories.View,
|
|
193
178
|
f1: true
|
|
194
179
|
}, 1 );
|
|
@@ -267,11 +252,7 @@ registerAction2(class extends BaseFocusAction {
|
|
|
267
252
|
constructor() {
|
|
268
253
|
super({
|
|
269
254
|
id: 'workbench.action.focusNextPart',
|
|
270
|
-
title: ( localize2WithPath(
|
|
271
|
-
'vs/workbench/browser/actions/navigationActions',
|
|
272
|
-
'focusNextPart',
|
|
273
|
-
'Focus Next Part'
|
|
274
|
-
)),
|
|
255
|
+
title: ( localize2WithPath(_moduleId, 4, 'Focus Next Part')),
|
|
275
256
|
category: Categories.View,
|
|
276
257
|
f1: true,
|
|
277
258
|
keybinding: {
|
|
@@ -285,11 +266,7 @@ registerAction2(class extends BaseFocusAction {
|
|
|
285
266
|
constructor() {
|
|
286
267
|
super({
|
|
287
268
|
id: 'workbench.action.focusPreviousPart',
|
|
288
|
-
title: ( localize2WithPath(
|
|
289
|
-
'vs/workbench/browser/actions/navigationActions',
|
|
290
|
-
'focusPreviousPart',
|
|
291
|
-
'Focus Previous Part'
|
|
292
|
-
)),
|
|
269
|
+
title: ( localize2WithPath(_moduleId, 5, 'Focus Previous Part')),
|
|
293
270
|
category: Categories.View,
|
|
294
271
|
f1: true,
|
|
295
272
|
keybinding: {
|