@codingame/monaco-vscode-view-common-service-override 5.3.0 → 6.0.0
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/viewCommon.js +1 -1
- package/vscode/src/vs/base/browser/ui/centered/centeredViewLayout.js +2 -1
- package/vscode/src/vs/base/browser/ui/grid/grid.js +34 -24
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +35 -34
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +9 -60
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +119 -79
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +76 -64
- package/vscode/src/vs/workbench/browser/media/style.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +51 -71
- package/vscode/src/vs/workbench/browser/parts/activitybar/media/activityaction.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +21 -18
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +6 -6
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +11 -8
- package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +8 -7
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +112 -107
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +36 -30
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +75 -69
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +143 -25
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +20 -16
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +13 -11
- package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +5 -4
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +8 -5
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +9 -6
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +51 -37
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +28 -25
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +23 -13
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +5 -5
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +3 -2
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +2 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +34 -23
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +3 -2
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +7 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +3 -2
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +1 -0
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +17 -15
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +4 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +9 -8
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +11 -6
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +24 -23
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +3 -2
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +5 -4
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +2 -1
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +26 -23
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +23 -13
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +5 -5
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +2 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +7 -6
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.js +8 -6
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +10 -8
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +3 -2
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +4 -3
- package/vscode/src/vs/workbench/services/activity/browser/activityService.js +1 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +1 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +21 -19
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +73 -63
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +19 -15
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +1 -0
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +23 -18
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +20 -14
- package/vscode/src/vs/base/browser/deviceAccess.js +0 -61
- package/vscode/src/vs/platform/languagePacks/common/localizedStrings.js +0 -13
- package/vscode/src/vs/workbench/browser/window.js +0 -330
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +0 -371
- package/vscode/src/vs/workbench/services/driver/browser/driver.js +0 -188
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KeyCode, KeyMod, KeyChord } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
2
|
+
import { KeybindingsRegistry, KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
2
3
|
import { List } from 'vscode/vscode/vs/base/browser/ui/list/listWidget';
|
|
3
4
|
import { WorkbenchListSelectionNavigation, WorkbenchListFocusContextKey, WorkbenchListSupportsMultiSelectContextKey, WorkbenchTreeElementCanCollapse, WorkbenchTreeElementHasParent, WorkbenchTreeStickyScrollFocused, getSelectionKeyboardEvent, WorkbenchTreeElementCanExpand, WorkbenchTreeElementHasChild, WorkbenchListHasSelectionOrFocus, RawWorkbenchListFocusContextKey, WorkbenchListSupportsFind, WorkbenchTreeFindOpen, WorkbenchListScrollAtTopContextKey, WorkbenchListScrollAtBottomContextKey } from 'vscode/vscode/vs/platform/list/browser/listService';
|
|
4
5
|
import { IListService } from 'vscode/vscode/vs/platform/list/browser/listService.service';
|
|
@@ -15,6 +16,7 @@ import { isActiveElement } from 'vscode/vscode/vs/base/browser/dom';
|
|
|
15
16
|
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
16
17
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
17
18
|
import { localize2WithPath, localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
19
|
+
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
18
20
|
|
|
19
21
|
const _moduleId = "vs/workbench/browser/actions/listCommands";
|
|
20
22
|
function ensureDOMFocus(widget) {
|
|
@@ -51,12 +53,12 @@ async function navigate(widget, updateFocusFn) {
|
|
|
51
53
|
}
|
|
52
54
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
53
55
|
id: 'list.focusDown',
|
|
54
|
-
weight:
|
|
56
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
55
57
|
when: WorkbenchListFocusContextKey,
|
|
56
|
-
primary:
|
|
58
|
+
primary: KeyCode.DownArrow,
|
|
57
59
|
mac: {
|
|
58
|
-
primary:
|
|
59
|
-
secondary: [
|
|
60
|
+
primary: KeyCode.DownArrow,
|
|
61
|
+
secondary: [KeyMod.WinCtrl | KeyCode.KeyN]
|
|
60
62
|
},
|
|
61
63
|
handler: (accessor, arg2) => {
|
|
62
64
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
@@ -67,12 +69,12 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
67
69
|
});
|
|
68
70
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
69
71
|
id: 'list.focusUp',
|
|
70
|
-
weight:
|
|
72
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
71
73
|
when: WorkbenchListFocusContextKey,
|
|
72
|
-
primary:
|
|
74
|
+
primary: KeyCode.UpArrow,
|
|
73
75
|
mac: {
|
|
74
|
-
primary:
|
|
75
|
-
secondary: [
|
|
76
|
+
primary: KeyCode.UpArrow,
|
|
77
|
+
secondary: [KeyMod.WinCtrl | KeyCode.KeyP]
|
|
76
78
|
},
|
|
77
79
|
handler: (accessor, arg2) => {
|
|
78
80
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
@@ -83,12 +85,12 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
83
85
|
});
|
|
84
86
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
85
87
|
id: 'list.focusAnyDown',
|
|
86
|
-
weight:
|
|
88
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
87
89
|
when: WorkbenchListFocusContextKey,
|
|
88
|
-
primary:
|
|
90
|
+
primary: KeyMod.Alt | KeyCode.DownArrow,
|
|
89
91
|
mac: {
|
|
90
|
-
primary:
|
|
91
|
-
secondary: [
|
|
92
|
+
primary: KeyMod.Alt | KeyCode.DownArrow,
|
|
93
|
+
secondary: [KeyMod.WinCtrl | KeyMod.Alt | KeyCode.KeyN]
|
|
92
94
|
},
|
|
93
95
|
handler: (accessor, arg2) => {
|
|
94
96
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
@@ -99,12 +101,12 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
99
101
|
});
|
|
100
102
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
101
103
|
id: 'list.focusAnyUp',
|
|
102
|
-
weight:
|
|
104
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
103
105
|
when: WorkbenchListFocusContextKey,
|
|
104
|
-
primary:
|
|
106
|
+
primary: KeyMod.Alt | KeyCode.UpArrow,
|
|
105
107
|
mac: {
|
|
106
|
-
primary:
|
|
107
|
-
secondary: [
|
|
108
|
+
primary: KeyMod.Alt | KeyCode.UpArrow,
|
|
109
|
+
secondary: [KeyMod.WinCtrl | KeyMod.Alt | KeyCode.KeyP]
|
|
108
110
|
},
|
|
109
111
|
handler: (accessor, arg2) => {
|
|
110
112
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
@@ -115,9 +117,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
115
117
|
});
|
|
116
118
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
117
119
|
id: 'list.focusPageDown',
|
|
118
|
-
weight:
|
|
120
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
119
121
|
when: WorkbenchListFocusContextKey,
|
|
120
|
-
primary:
|
|
122
|
+
primary: KeyCode.PageDown,
|
|
121
123
|
handler: (accessor) => {
|
|
122
124
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
123
125
|
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown')));
|
|
@@ -127,9 +129,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
127
129
|
});
|
|
128
130
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
129
131
|
id: 'list.focusPageUp',
|
|
130
|
-
weight:
|
|
132
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
131
133
|
when: WorkbenchListFocusContextKey,
|
|
132
|
-
primary:
|
|
134
|
+
primary: KeyCode.PageUp,
|
|
133
135
|
handler: (accessor) => {
|
|
134
136
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
135
137
|
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown')));
|
|
@@ -139,9 +141,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
139
141
|
});
|
|
140
142
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
141
143
|
id: 'list.focusFirst',
|
|
142
|
-
weight:
|
|
144
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
143
145
|
when: WorkbenchListFocusContextKey,
|
|
144
|
-
primary:
|
|
146
|
+
primary: KeyCode.Home,
|
|
145
147
|
handler: (accessor) => {
|
|
146
148
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
147
149
|
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown')));
|
|
@@ -151,9 +153,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
151
153
|
});
|
|
152
154
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
153
155
|
id: 'list.focusLast',
|
|
154
|
-
weight:
|
|
156
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
155
157
|
when: WorkbenchListFocusContextKey,
|
|
156
|
-
primary:
|
|
158
|
+
primary: KeyCode.End,
|
|
157
159
|
handler: (accessor) => {
|
|
158
160
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
159
161
|
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown')));
|
|
@@ -163,9 +165,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
163
165
|
});
|
|
164
166
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
165
167
|
id: 'list.focusAnyFirst',
|
|
166
|
-
weight:
|
|
168
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
167
169
|
when: WorkbenchListFocusContextKey,
|
|
168
|
-
primary:
|
|
170
|
+
primary: KeyMod.Alt | KeyCode.Home,
|
|
169
171
|
handler: (accessor) => {
|
|
170
172
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
171
173
|
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown', { altKey: true })));
|
|
@@ -175,9 +177,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
175
177
|
});
|
|
176
178
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
177
179
|
id: 'list.focusAnyLast',
|
|
178
|
-
weight:
|
|
180
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
179
181
|
when: WorkbenchListFocusContextKey,
|
|
180
|
-
primary:
|
|
182
|
+
primary: KeyMod.Alt | KeyCode.End,
|
|
181
183
|
handler: (accessor) => {
|
|
182
184
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
183
185
|
const fakeKeyboardEvent = ( (new KeyboardEvent('keydown', { altKey: true })));
|
|
@@ -230,9 +232,9 @@ function revealFocusedStickyScroll(tree, postRevealAction) {
|
|
|
230
232
|
}
|
|
231
233
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
232
234
|
id: 'list.expandSelectionDown',
|
|
233
|
-
weight:
|
|
235
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
234
236
|
when: ( (ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListSupportsMultiSelectContextKey))),
|
|
235
|
-
primary:
|
|
237
|
+
primary: KeyMod.Shift | KeyCode.DownArrow,
|
|
236
238
|
handler: (accessor, arg2) => {
|
|
237
239
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
238
240
|
if (!widget) {
|
|
@@ -251,9 +253,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
251
253
|
});
|
|
252
254
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
253
255
|
id: 'list.expandSelectionUp',
|
|
254
|
-
weight:
|
|
256
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
255
257
|
when: ( (ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListSupportsMultiSelectContextKey))),
|
|
256
|
-
primary:
|
|
258
|
+
primary: KeyMod.Shift | KeyCode.UpArrow,
|
|
257
259
|
handler: (accessor, arg2) => {
|
|
258
260
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
259
261
|
if (!widget) {
|
|
@@ -272,15 +274,15 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
272
274
|
});
|
|
273
275
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
274
276
|
id: 'list.collapse',
|
|
275
|
-
weight:
|
|
277
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
276
278
|
when: ( (ContextKeyExpr.and(
|
|
277
279
|
WorkbenchListFocusContextKey,
|
|
278
280
|
(ContextKeyExpr.or(WorkbenchTreeElementCanCollapse, WorkbenchTreeElementHasParent))
|
|
279
281
|
))),
|
|
280
|
-
primary:
|
|
282
|
+
primary: KeyCode.LeftArrow,
|
|
281
283
|
mac: {
|
|
282
|
-
primary:
|
|
283
|
-
secondary: [
|
|
284
|
+
primary: KeyCode.LeftArrow,
|
|
285
|
+
secondary: [KeyMod.CtrlCmd | KeyCode.UpArrow]
|
|
284
286
|
},
|
|
285
287
|
handler: (accessor) => {
|
|
286
288
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
@@ -306,12 +308,12 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
306
308
|
});
|
|
307
309
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
308
310
|
id: 'list.stickyScroll.collapse',
|
|
309
|
-
weight:
|
|
311
|
+
weight: KeybindingWeight.WorkbenchContrib + 50,
|
|
310
312
|
when: WorkbenchTreeStickyScrollFocused,
|
|
311
|
-
primary:
|
|
313
|
+
primary: KeyCode.LeftArrow,
|
|
312
314
|
mac: {
|
|
313
|
-
primary:
|
|
314
|
-
secondary: [
|
|
315
|
+
primary: KeyCode.LeftArrow,
|
|
316
|
+
secondary: [KeyMod.CtrlCmd | KeyCode.UpArrow]
|
|
315
317
|
},
|
|
316
318
|
handler: (accessor) => {
|
|
317
319
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
@@ -323,12 +325,12 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
323
325
|
});
|
|
324
326
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
325
327
|
id: 'list.collapseAll',
|
|
326
|
-
weight:
|
|
328
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
327
329
|
when: WorkbenchListFocusContextKey,
|
|
328
|
-
primary:
|
|
330
|
+
primary: KeyMod.CtrlCmd | KeyCode.LeftArrow,
|
|
329
331
|
mac: {
|
|
330
|
-
primary:
|
|
331
|
-
secondary: [
|
|
332
|
+
primary: KeyMod.CtrlCmd | KeyCode.LeftArrow,
|
|
333
|
+
secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.UpArrow]
|
|
332
334
|
},
|
|
333
335
|
handler: (accessor) => {
|
|
334
336
|
const focused = accessor.get(IListService).lastFocusedList;
|
|
@@ -339,7 +341,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
339
341
|
});
|
|
340
342
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
341
343
|
id: 'list.collapseAllToFocus',
|
|
342
|
-
weight:
|
|
344
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
343
345
|
when: WorkbenchListFocusContextKey,
|
|
344
346
|
handler: accessor => {
|
|
345
347
|
const focused = accessor.get(IListService).lastFocusedList;
|
|
@@ -357,7 +359,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
357
359
|
});
|
|
358
360
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
359
361
|
id: 'list.focusParent',
|
|
360
|
-
weight:
|
|
362
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
361
363
|
when: WorkbenchListFocusContextKey,
|
|
362
364
|
handler: (accessor) => {
|
|
363
365
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
@@ -381,12 +383,12 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
381
383
|
});
|
|
382
384
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
383
385
|
id: 'list.expand',
|
|
384
|
-
weight:
|
|
386
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
385
387
|
when: ( (ContextKeyExpr.and(
|
|
386
388
|
WorkbenchListFocusContextKey,
|
|
387
389
|
(ContextKeyExpr.or(WorkbenchTreeElementCanExpand, WorkbenchTreeElementHasChild))
|
|
388
390
|
))),
|
|
389
|
-
primary:
|
|
391
|
+
primary: KeyCode.RightArrow,
|
|
390
392
|
handler: (accessor) => {
|
|
391
393
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
392
394
|
if (!widget) {
|
|
@@ -463,12 +465,12 @@ function selectElement(accessor, retainCurrentFocus) {
|
|
|
463
465
|
}
|
|
464
466
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
465
467
|
id: 'list.select',
|
|
466
|
-
weight:
|
|
468
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
467
469
|
when: WorkbenchListFocusContextKey,
|
|
468
|
-
primary:
|
|
470
|
+
primary: KeyCode.Enter,
|
|
469
471
|
mac: {
|
|
470
|
-
primary:
|
|
471
|
-
secondary: [
|
|
472
|
+
primary: KeyCode.Enter,
|
|
473
|
+
secondary: [KeyMod.CtrlCmd | KeyCode.DownArrow]
|
|
472
474
|
},
|
|
473
475
|
handler: (accessor) => {
|
|
474
476
|
selectElement(accessor, false);
|
|
@@ -476,12 +478,12 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
476
478
|
});
|
|
477
479
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
478
480
|
id: 'list.stickyScrollselect',
|
|
479
|
-
weight:
|
|
481
|
+
weight: KeybindingWeight.WorkbenchContrib + 50,
|
|
480
482
|
when: WorkbenchTreeStickyScrollFocused,
|
|
481
|
-
primary:
|
|
483
|
+
primary: KeyCode.Enter,
|
|
482
484
|
mac: {
|
|
483
|
-
primary:
|
|
484
|
-
secondary: [
|
|
485
|
+
primary: KeyCode.Enter,
|
|
486
|
+
secondary: [KeyMod.CtrlCmd | KeyCode.DownArrow]
|
|
485
487
|
},
|
|
486
488
|
handler: (accessor) => {
|
|
487
489
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
@@ -493,7 +495,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
493
495
|
});
|
|
494
496
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
495
497
|
id: 'list.selectAndPreserveFocus',
|
|
496
|
-
weight:
|
|
498
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
497
499
|
when: WorkbenchListFocusContextKey,
|
|
498
500
|
handler: accessor => {
|
|
499
501
|
selectElement(accessor, true);
|
|
@@ -501,9 +503,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
501
503
|
});
|
|
502
504
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
503
505
|
id: 'list.selectAll',
|
|
504
|
-
weight:
|
|
506
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
505
507
|
when: ( (ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListSupportsMultiSelectContextKey))),
|
|
506
|
-
primary:
|
|
508
|
+
primary: KeyMod.CtrlCmd | KeyCode.KeyA,
|
|
507
509
|
handler: (accessor) => {
|
|
508
510
|
const focused = accessor.get(IListService).lastFocusedList;
|
|
509
511
|
if (focused instanceof List || focused instanceof PagedList || focused instanceof Table) {
|
|
@@ -551,9 +553,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
551
553
|
});
|
|
552
554
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
553
555
|
id: 'list.toggleSelection',
|
|
554
|
-
weight:
|
|
556
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
555
557
|
when: WorkbenchListFocusContextKey,
|
|
556
|
-
primary:
|
|
558
|
+
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Enter,
|
|
557
559
|
handler: (accessor) => {
|
|
558
560
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
559
561
|
if (!widget) {
|
|
@@ -573,11 +575,49 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
573
575
|
}
|
|
574
576
|
}
|
|
575
577
|
});
|
|
578
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
579
|
+
id: 'list.showHover',
|
|
580
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
581
|
+
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyI),
|
|
582
|
+
when: WorkbenchListFocusContextKey,
|
|
583
|
+
handler: async (accessor, ...args) => {
|
|
584
|
+
const listService = accessor.get(IListService);
|
|
585
|
+
const lastFocusedList = listService.lastFocusedList;
|
|
586
|
+
if (!lastFocusedList) {
|
|
587
|
+
return;
|
|
588
|
+
}
|
|
589
|
+
const focus = lastFocusedList.getFocus();
|
|
590
|
+
if (!focus || (focus.length === 0)) {
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
593
|
+
const treeDOM = lastFocusedList.getHTMLElement();
|
|
594
|
+
const scrollableElement = treeDOM.querySelector('.monaco-scrollable-element');
|
|
595
|
+
const listRows = scrollableElement?.querySelector('.monaco-list-rows');
|
|
596
|
+
const focusedElement = listRows?.querySelector('.focused');
|
|
597
|
+
if (!focusedElement) {
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
600
|
+
const elementWithHover = getCustomHoverForElement(focusedElement);
|
|
601
|
+
if (elementWithHover) {
|
|
602
|
+
accessor.get(IHoverService).triggerUpdatableHover(elementWithHover);
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
});
|
|
606
|
+
function getCustomHoverForElement(element) {
|
|
607
|
+
if (element.matches('[custom-hover="true"]')) {
|
|
608
|
+
return element;
|
|
609
|
+
}
|
|
610
|
+
const noneFocusableElementWithHover = element.querySelector('[custom-hover="true"]:not([tabindex]):not(.action-item)');
|
|
611
|
+
if (noneFocusableElementWithHover) {
|
|
612
|
+
return noneFocusableElementWithHover;
|
|
613
|
+
}
|
|
614
|
+
return undefined;
|
|
615
|
+
}
|
|
576
616
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
577
617
|
id: 'list.toggleExpand',
|
|
578
|
-
weight:
|
|
618
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
579
619
|
when: WorkbenchListFocusContextKey,
|
|
580
|
-
primary:
|
|
620
|
+
primary: KeyCode.Space,
|
|
581
621
|
handler: (accessor) => {
|
|
582
622
|
const focused = accessor.get(IListService).lastFocusedList;
|
|
583
623
|
if (focused instanceof ObjectTree || focused instanceof DataTree || focused instanceof AsyncDataTree) {
|
|
@@ -593,9 +633,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
593
633
|
});
|
|
594
634
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
595
635
|
id: 'list.stickyScrolltoggleExpand',
|
|
596
|
-
weight:
|
|
636
|
+
weight: KeybindingWeight.WorkbenchContrib + 50,
|
|
597
637
|
when: WorkbenchTreeStickyScrollFocused,
|
|
598
|
-
primary:
|
|
638
|
+
primary: KeyCode.Space,
|
|
599
639
|
handler: (accessor) => {
|
|
600
640
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
601
641
|
if (!widget || !(widget instanceof ObjectTree || widget instanceof DataTree || widget instanceof AsyncDataTree)) {
|
|
@@ -606,9 +646,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
606
646
|
});
|
|
607
647
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
608
648
|
id: 'list.clear',
|
|
609
|
-
weight:
|
|
649
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
610
650
|
when: ( (ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListHasSelectionOrFocus))),
|
|
611
|
-
primary:
|
|
651
|
+
primary: KeyCode.Escape,
|
|
612
652
|
handler: (accessor) => {
|
|
613
653
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
614
654
|
if (!widget) {
|
|
@@ -664,10 +704,10 @@ CommandsRegistry.registerCommandAlias('list.toggleKeyboardNavigation', 'list.tri
|
|
|
664
704
|
CommandsRegistry.registerCommandAlias('list.toggleFilterOnType', 'list.toggleFindMode');
|
|
665
705
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
666
706
|
id: 'list.find',
|
|
667
|
-
weight:
|
|
707
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
668
708
|
when: ( (ContextKeyExpr.and(RawWorkbenchListFocusContextKey, WorkbenchListSupportsFind))),
|
|
669
|
-
primary:
|
|
670
|
-
secondary: [
|
|
709
|
+
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyF,
|
|
710
|
+
secondary: [KeyCode.F3],
|
|
671
711
|
handler: (accessor) => {
|
|
672
712
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
673
713
|
if (widget instanceof List || widget instanceof PagedList || widget instanceof Table) ;
|
|
@@ -679,9 +719,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
679
719
|
});
|
|
680
720
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
681
721
|
id: 'list.closeFind',
|
|
682
|
-
weight:
|
|
722
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
683
723
|
when: ( (ContextKeyExpr.and(RawWorkbenchListFocusContextKey, WorkbenchTreeFindOpen))),
|
|
684
|
-
primary:
|
|
724
|
+
primary: KeyCode.Escape,
|
|
685
725
|
handler: (accessor) => {
|
|
686
726
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
687
727
|
if (widget instanceof AbstractTree || widget instanceof AsyncDataTree) {
|
|
@@ -692,9 +732,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
692
732
|
});
|
|
693
733
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
694
734
|
id: 'list.scrollUp',
|
|
695
|
-
weight:
|
|
735
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
696
736
|
when: ( (ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListScrollAtTopContextKey?.negate()))),
|
|
697
|
-
primary:
|
|
737
|
+
primary: KeyMod.CtrlCmd | KeyCode.UpArrow,
|
|
698
738
|
handler: accessor => {
|
|
699
739
|
const focused = accessor.get(IListService).lastFocusedList;
|
|
700
740
|
if (!focused) {
|
|
@@ -705,12 +745,12 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
705
745
|
});
|
|
706
746
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
707
747
|
id: 'list.scrollDown',
|
|
708
|
-
weight:
|
|
748
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
709
749
|
when: ( (ContextKeyExpr.and(
|
|
710
750
|
WorkbenchListFocusContextKey,
|
|
711
751
|
WorkbenchListScrollAtBottomContextKey?.negate()
|
|
712
752
|
))),
|
|
713
|
-
primary:
|
|
753
|
+
primary: KeyMod.CtrlCmd | KeyCode.DownArrow,
|
|
714
754
|
handler: accessor => {
|
|
715
755
|
const focused = accessor.get(IListService).lastFocusedList;
|
|
716
756
|
if (!focused) {
|
|
@@ -721,7 +761,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
721
761
|
});
|
|
722
762
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
723
763
|
id: 'list.scrollLeft',
|
|
724
|
-
weight:
|
|
764
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
725
765
|
when: WorkbenchListFocusContextKey,
|
|
726
766
|
handler: accessor => {
|
|
727
767
|
const focused = accessor.get(IListService).lastFocusedList;
|
|
@@ -733,7 +773,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
733
773
|
});
|
|
734
774
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
735
775
|
id: 'list.scrollRight',
|
|
736
|
-
weight:
|
|
776
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
737
777
|
when: WorkbenchListFocusContextKey,
|
|
738
778
|
handler: accessor => {
|
|
739
779
|
const focused = accessor.get(IListService).lastFocusedList;
|