@codingame/monaco-vscode-view-common-service-override 11.1.2 → 12.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/index.d.ts +3 -1
- package/index.js +110 -1
- package/package.json +64 -10
- package/service-override/tools/editorAssets.d.ts +1 -0
- package/service-override/tools/editorAssets.js +5 -0
- package/vscode/src/vs/platform/actions/browser/actionViewItemService.d.ts +21 -0
- package/vscode/src/vs/platform/actions/browser/actionViewItemService.js +2 -0
- package/vscode/src/vs/platform/webview/common/mimeTypes.d.ts +2 -0
- package/vscode/src/vs/platform/webview/common/mimeTypes.js +1 -0
- package/vscode/src/vs/platform/webview/common/webviewPortMapping.d.ts +18 -0
- package/vscode/src/vs/platform/webview/common/webviewPortMapping.js +1 -0
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.d.ts +7 -0
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +116 -115
- package/vscode/src/vs/workbench/browser/actions/listCommands.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +120 -125
- package/vscode/src/vs/workbench/browser/actions/navigationActions.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +81 -74
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +216 -250
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.d.ts +21 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +26 -25
- package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.d.ts +32 -0
- package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +10 -8
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +58 -64
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +48 -38
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.d.ts +54 -0
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +19 -40
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/media/callHierarchy.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +7 -5
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.d.ts +58 -0
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +6 -4
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +6 -4
- package/vscode/src/vs/workbench/contrib/customEditor/browser/media/customEditor.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +16 -16
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.d.ts +65 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +15 -10
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +1 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +27 -25
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +4 -2
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +6 -386
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.js +385 -0
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/media/languageStatus.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +20 -20
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.d.ts +105 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +50 -62
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +16 -15
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +15 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorSerializer.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorSerializer.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +14 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +15 -14
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +3 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +37 -39
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +22 -21
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.js +3 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/media/mergeEditor.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.d.ts +117 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +57 -53
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +27 -25
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +15 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.js +4 -3
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +28 -28
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +7 -5
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.js +2 -1
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/media/typeHierarchy.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +54 -56
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +48 -38
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +19 -30
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.d.ts +101 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +3 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +7 -6
- package/vscode/src/vs/workbench/contrib/webview/browser/themeing.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +7 -6
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.d.ts +139 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +58 -56
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.js +4 -3
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.js +2 -1
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +28 -28
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.js +3 -2
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +15 -13
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.d.ts +64 -0
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +10 -8
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.js +1 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.d.ts +6 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +3 -1
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.d.ts +60 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +64 -63
- package/vscode/src/vs/workbench/services/history/browser/historyService.d.ts +184 -0
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +154 -148
- package/vscode/src/vs/workbench/services/progress/browser/media/progressService.css.js +1 -1
- package/vscode/src/vs/workbench/services/progress/browser/progressService.d.ts +36 -0
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +59 -54
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.d.ts +34 -0
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.js +4 -3
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.d.ts +71 -0
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +4 -2
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.d.ts +122 -0
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +86 -90
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.d.ts +80 -0
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +58 -64
- package/override/vs/workbench/browser/parts/editor/textEditor.js +0 -5
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +0 -11
- package/tools/editorAssets.js +0 -4
- package/tools/url.js +0 -10
- package/viewCommon.js +0 -109
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
|
|
2
|
+
import { KeyCode, KeyMod, KeyChord } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
3
|
+
import { KeybindingsRegistry, KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
3
4
|
import { List } from 'vscode/vscode/vs/base/browser/ui/list/listWidget';
|
|
4
5
|
import { WorkbenchListSelectionNavigation, WorkbenchListFocusContextKey, WorkbenchListSupportsMultiSelectContextKey, WorkbenchTreeElementCanCollapse, WorkbenchTreeElementHasParent, WorkbenchTreeStickyScrollFocused, getSelectionKeyboardEvent, WorkbenchTreeElementCanExpand, WorkbenchTreeElementHasChild, WorkbenchListHasSelectionOrFocus, RawWorkbenchListFocusContextKey, WorkbenchListSupportsFind, WorkbenchTreeFindOpen, WorkbenchListScrollAtTopContextKey, WorkbenchListScrollAtBottomContextKey } from 'vscode/vscode/vs/platform/list/browser/listService';
|
|
5
6
|
import { IListService } from 'vscode/vscode/vs/platform/list/browser/listService.service';
|
|
@@ -35,7 +36,7 @@ async function updateFocus(widget, updateFocusFn) {
|
|
|
35
36
|
if (selection.length > 1 || !equals(focus, selection) || equals(focus, newFocus)) {
|
|
36
37
|
return;
|
|
37
38
|
}
|
|
38
|
-
const fakeKeyboardEvent = (
|
|
39
|
+
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
39
40
|
widget.setSelection(newFocus, fakeKeyboardEvent);
|
|
40
41
|
}
|
|
41
42
|
async function navigate(widget, updateFocusFn) {
|
|
@@ -52,136 +53,136 @@ async function navigate(widget, updateFocusFn) {
|
|
|
52
53
|
}
|
|
53
54
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
54
55
|
id: 'list.focusDown',
|
|
55
|
-
weight:
|
|
56
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
56
57
|
when: WorkbenchListFocusContextKey,
|
|
57
|
-
primary:
|
|
58
|
+
primary: KeyCode.DownArrow,
|
|
58
59
|
mac: {
|
|
59
|
-
primary:
|
|
60
|
-
secondary: [
|
|
60
|
+
primary: KeyCode.DownArrow,
|
|
61
|
+
secondary: [KeyMod.WinCtrl | KeyCode.KeyN]
|
|
61
62
|
},
|
|
62
63
|
handler: (accessor, arg2) => {
|
|
63
64
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
64
|
-
const fakeKeyboardEvent = (
|
|
65
|
+
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
65
66
|
await widget.focusNext(typeof arg2 === 'number' ? arg2 : 1, false, fakeKeyboardEvent);
|
|
66
67
|
});
|
|
67
68
|
}
|
|
68
69
|
});
|
|
69
70
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
70
71
|
id: 'list.focusUp',
|
|
71
|
-
weight:
|
|
72
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
72
73
|
when: WorkbenchListFocusContextKey,
|
|
73
|
-
primary:
|
|
74
|
+
primary: KeyCode.UpArrow,
|
|
74
75
|
mac: {
|
|
75
|
-
primary:
|
|
76
|
-
secondary: [
|
|
76
|
+
primary: KeyCode.UpArrow,
|
|
77
|
+
secondary: [KeyMod.WinCtrl | KeyCode.KeyP]
|
|
77
78
|
},
|
|
78
79
|
handler: (accessor, arg2) => {
|
|
79
80
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
80
|
-
const fakeKeyboardEvent = (
|
|
81
|
+
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
81
82
|
await widget.focusPrevious(typeof arg2 === 'number' ? arg2 : 1, false, fakeKeyboardEvent);
|
|
82
83
|
});
|
|
83
84
|
}
|
|
84
85
|
});
|
|
85
86
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
86
87
|
id: 'list.focusAnyDown',
|
|
87
|
-
weight:
|
|
88
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
88
89
|
when: WorkbenchListFocusContextKey,
|
|
89
|
-
primary:
|
|
90
|
+
primary: KeyMod.Alt | KeyCode.DownArrow,
|
|
90
91
|
mac: {
|
|
91
|
-
primary:
|
|
92
|
-
secondary: [
|
|
92
|
+
primary: KeyMod.Alt | KeyCode.DownArrow,
|
|
93
|
+
secondary: [KeyMod.WinCtrl | KeyMod.Alt | KeyCode.KeyN]
|
|
93
94
|
},
|
|
94
95
|
handler: (accessor, arg2) => {
|
|
95
96
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
96
|
-
const fakeKeyboardEvent = (
|
|
97
|
+
const fakeKeyboardEvent = ( new KeyboardEvent('keydown', { altKey: true }));
|
|
97
98
|
await widget.focusNext(typeof arg2 === 'number' ? arg2 : 1, false, fakeKeyboardEvent);
|
|
98
99
|
});
|
|
99
100
|
}
|
|
100
101
|
});
|
|
101
102
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
102
103
|
id: 'list.focusAnyUp',
|
|
103
|
-
weight:
|
|
104
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
104
105
|
when: WorkbenchListFocusContextKey,
|
|
105
|
-
primary:
|
|
106
|
+
primary: KeyMod.Alt | KeyCode.UpArrow,
|
|
106
107
|
mac: {
|
|
107
|
-
primary:
|
|
108
|
-
secondary: [
|
|
108
|
+
primary: KeyMod.Alt | KeyCode.UpArrow,
|
|
109
|
+
secondary: [KeyMod.WinCtrl | KeyMod.Alt | KeyCode.KeyP]
|
|
109
110
|
},
|
|
110
111
|
handler: (accessor, arg2) => {
|
|
111
112
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
112
|
-
const fakeKeyboardEvent = (
|
|
113
|
+
const fakeKeyboardEvent = ( new KeyboardEvent('keydown', { altKey: true }));
|
|
113
114
|
await widget.focusPrevious(typeof arg2 === 'number' ? arg2 : 1, false, fakeKeyboardEvent);
|
|
114
115
|
});
|
|
115
116
|
}
|
|
116
117
|
});
|
|
117
118
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
118
119
|
id: 'list.focusPageDown',
|
|
119
|
-
weight:
|
|
120
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
120
121
|
when: WorkbenchListFocusContextKey,
|
|
121
|
-
primary:
|
|
122
|
+
primary: KeyCode.PageDown,
|
|
122
123
|
handler: (accessor) => {
|
|
123
124
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
124
|
-
const fakeKeyboardEvent = (
|
|
125
|
+
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
125
126
|
await widget.focusNextPage(fakeKeyboardEvent);
|
|
126
127
|
});
|
|
127
128
|
}
|
|
128
129
|
});
|
|
129
130
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
130
131
|
id: 'list.focusPageUp',
|
|
131
|
-
weight:
|
|
132
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
132
133
|
when: WorkbenchListFocusContextKey,
|
|
133
|
-
primary:
|
|
134
|
+
primary: KeyCode.PageUp,
|
|
134
135
|
handler: (accessor) => {
|
|
135
136
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
136
|
-
const fakeKeyboardEvent = (
|
|
137
|
+
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
137
138
|
await widget.focusPreviousPage(fakeKeyboardEvent);
|
|
138
139
|
});
|
|
139
140
|
}
|
|
140
141
|
});
|
|
141
142
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
142
143
|
id: 'list.focusFirst',
|
|
143
|
-
weight:
|
|
144
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
144
145
|
when: WorkbenchListFocusContextKey,
|
|
145
|
-
primary:
|
|
146
|
+
primary: KeyCode.Home,
|
|
146
147
|
handler: (accessor) => {
|
|
147
148
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
148
|
-
const fakeKeyboardEvent = (
|
|
149
|
+
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
149
150
|
await widget.focusFirst(fakeKeyboardEvent);
|
|
150
151
|
});
|
|
151
152
|
}
|
|
152
153
|
});
|
|
153
154
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
154
155
|
id: 'list.focusLast',
|
|
155
|
-
weight:
|
|
156
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
156
157
|
when: WorkbenchListFocusContextKey,
|
|
157
|
-
primary:
|
|
158
|
+
primary: KeyCode.End,
|
|
158
159
|
handler: (accessor) => {
|
|
159
160
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
160
|
-
const fakeKeyboardEvent = (
|
|
161
|
+
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
161
162
|
await widget.focusLast(fakeKeyboardEvent);
|
|
162
163
|
});
|
|
163
164
|
}
|
|
164
165
|
});
|
|
165
166
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
166
167
|
id: 'list.focusAnyFirst',
|
|
167
|
-
weight:
|
|
168
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
168
169
|
when: WorkbenchListFocusContextKey,
|
|
169
|
-
primary:
|
|
170
|
+
primary: KeyMod.Alt | KeyCode.Home,
|
|
170
171
|
handler: (accessor) => {
|
|
171
172
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
172
|
-
const fakeKeyboardEvent = (
|
|
173
|
+
const fakeKeyboardEvent = ( new KeyboardEvent('keydown', { altKey: true }));
|
|
173
174
|
await widget.focusFirst(fakeKeyboardEvent);
|
|
174
175
|
});
|
|
175
176
|
}
|
|
176
177
|
});
|
|
177
178
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
178
179
|
id: 'list.focusAnyLast',
|
|
179
|
-
weight:
|
|
180
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
180
181
|
when: WorkbenchListFocusContextKey,
|
|
181
|
-
primary:
|
|
182
|
+
primary: KeyMod.Alt | KeyCode.End,
|
|
182
183
|
handler: (accessor) => {
|
|
183
184
|
navigate(accessor.get(IListService).lastFocusedList, async (widget) => {
|
|
184
|
-
const fakeKeyboardEvent = (
|
|
185
|
+
const fakeKeyboardEvent = ( new KeyboardEvent('keydown', { altKey: true }));
|
|
185
186
|
await widget.focusLast(fakeKeyboardEvent);
|
|
186
187
|
});
|
|
187
188
|
}
|
|
@@ -207,7 +208,7 @@ function expandMultiSelection(focused, previousFocus) {
|
|
|
207
208
|
return;
|
|
208
209
|
}
|
|
209
210
|
const selection = list.getSelection();
|
|
210
|
-
const fakeKeyboardEvent = (
|
|
211
|
+
const fakeKeyboardEvent = ( new KeyboardEvent('keydown', { shiftKey: true }));
|
|
211
212
|
if (selection && selection.indexOf(focus) >= 0) {
|
|
212
213
|
list.setSelection(selection.filter(s => s !== previousFocus), fakeKeyboardEvent);
|
|
213
214
|
}
|
|
@@ -219,10 +220,10 @@ function expandMultiSelection(focused, previousFocus) {
|
|
|
219
220
|
function revealFocusedStickyScroll(tree, postRevealAction) {
|
|
220
221
|
const focus = tree.getStickyScrollFocus();
|
|
221
222
|
if (focus.length === 0) {
|
|
222
|
-
throw (
|
|
223
|
+
throw ( new Error(`StickyScroll has no focus`));
|
|
223
224
|
}
|
|
224
225
|
if (focus.length > 1) {
|
|
225
|
-
throw (
|
|
226
|
+
throw ( new Error(`StickyScroll can only have a single focused item`));
|
|
226
227
|
}
|
|
227
228
|
tree.reveal(focus[0]);
|
|
228
229
|
tree.getHTMLElement().focus();
|
|
@@ -231,16 +232,16 @@ function revealFocusedStickyScroll(tree, postRevealAction) {
|
|
|
231
232
|
}
|
|
232
233
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
233
234
|
id: 'list.expandSelectionDown',
|
|
234
|
-
weight:
|
|
235
|
-
when: (
|
|
236
|
-
primary:
|
|
235
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
236
|
+
when: ( ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListSupportsMultiSelectContextKey)),
|
|
237
|
+
primary: KeyMod.Shift | KeyCode.DownArrow,
|
|
237
238
|
handler: (accessor, arg2) => {
|
|
238
239
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
239
240
|
if (!widget) {
|
|
240
241
|
return;
|
|
241
242
|
}
|
|
242
243
|
const previousFocus = widget.getFocus() ? widget.getFocus()[0] : undefined;
|
|
243
|
-
const fakeKeyboardEvent = (
|
|
244
|
+
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
244
245
|
widget.focusNext(typeof arg2 === 'number' ? arg2 : 1, false, fakeKeyboardEvent);
|
|
245
246
|
expandMultiSelection(widget, previousFocus);
|
|
246
247
|
const focus = widget.getFocus();
|
|
@@ -252,16 +253,16 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
252
253
|
});
|
|
253
254
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
254
255
|
id: 'list.expandSelectionUp',
|
|
255
|
-
weight:
|
|
256
|
-
when: (
|
|
257
|
-
primary:
|
|
256
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
257
|
+
when: ( ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListSupportsMultiSelectContextKey)),
|
|
258
|
+
primary: KeyMod.Shift | KeyCode.UpArrow,
|
|
258
259
|
handler: (accessor, arg2) => {
|
|
259
260
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
260
261
|
if (!widget) {
|
|
261
262
|
return;
|
|
262
263
|
}
|
|
263
264
|
const previousFocus = widget.getFocus() ? widget.getFocus()[0] : undefined;
|
|
264
|
-
const fakeKeyboardEvent = (
|
|
265
|
+
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
265
266
|
widget.focusPrevious(typeof arg2 === 'number' ? arg2 : 1, false, fakeKeyboardEvent);
|
|
266
267
|
expandMultiSelection(widget, previousFocus);
|
|
267
268
|
const focus = widget.getFocus();
|
|
@@ -273,15 +274,12 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
273
274
|
});
|
|
274
275
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
275
276
|
id: 'list.collapse',
|
|
276
|
-
weight:
|
|
277
|
-
when: (
|
|
278
|
-
|
|
279
|
-
(ContextKeyExpr.or(WorkbenchTreeElementCanCollapse, WorkbenchTreeElementHasParent))
|
|
280
|
-
))),
|
|
281
|
-
primary: 15 ,
|
|
277
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
278
|
+
when: ( ContextKeyExpr.and(WorkbenchListFocusContextKey, ( ContextKeyExpr.or(WorkbenchTreeElementCanCollapse, WorkbenchTreeElementHasParent)))),
|
|
279
|
+
primary: KeyCode.LeftArrow,
|
|
282
280
|
mac: {
|
|
283
|
-
primary:
|
|
284
|
-
secondary: [
|
|
281
|
+
primary: KeyCode.LeftArrow,
|
|
282
|
+
secondary: [KeyMod.CtrlCmd | KeyCode.UpArrow]
|
|
285
283
|
},
|
|
286
284
|
handler: (accessor) => {
|
|
287
285
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
@@ -298,7 +296,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
298
296
|
const parent = tree.getParentElement(focus);
|
|
299
297
|
if (parent) {
|
|
300
298
|
navigate(widget, widget => {
|
|
301
|
-
const fakeKeyboardEvent = (
|
|
299
|
+
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
302
300
|
widget.setFocus([parent], fakeKeyboardEvent);
|
|
303
301
|
});
|
|
304
302
|
}
|
|
@@ -307,12 +305,12 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
307
305
|
});
|
|
308
306
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
309
307
|
id: 'list.stickyScroll.collapse',
|
|
310
|
-
weight:
|
|
308
|
+
weight: KeybindingWeight.WorkbenchContrib + 50,
|
|
311
309
|
when: WorkbenchTreeStickyScrollFocused,
|
|
312
|
-
primary:
|
|
310
|
+
primary: KeyCode.LeftArrow,
|
|
313
311
|
mac: {
|
|
314
|
-
primary:
|
|
315
|
-
secondary: [
|
|
312
|
+
primary: KeyCode.LeftArrow,
|
|
313
|
+
secondary: [KeyMod.CtrlCmd | KeyCode.UpArrow]
|
|
316
314
|
},
|
|
317
315
|
handler: (accessor) => {
|
|
318
316
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
@@ -324,12 +322,12 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
324
322
|
});
|
|
325
323
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
326
324
|
id: 'list.collapseAll',
|
|
327
|
-
weight:
|
|
325
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
328
326
|
when: WorkbenchListFocusContextKey,
|
|
329
|
-
primary:
|
|
327
|
+
primary: KeyMod.CtrlCmd | KeyCode.LeftArrow,
|
|
330
328
|
mac: {
|
|
331
|
-
primary:
|
|
332
|
-
secondary: [
|
|
329
|
+
primary: KeyMod.CtrlCmd | KeyCode.LeftArrow,
|
|
330
|
+
secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.UpArrow]
|
|
333
331
|
},
|
|
334
332
|
handler: (accessor) => {
|
|
335
333
|
const focused = accessor.get(IListService).lastFocusedList;
|
|
@@ -340,7 +338,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
340
338
|
});
|
|
341
339
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
342
340
|
id: 'list.collapseAllToFocus',
|
|
343
|
-
weight:
|
|
341
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
344
342
|
when: WorkbenchListFocusContextKey,
|
|
345
343
|
handler: accessor => {
|
|
346
344
|
const focused = accessor.get(IListService).lastFocusedList;
|
|
@@ -358,7 +356,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
358
356
|
});
|
|
359
357
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
360
358
|
id: 'list.focusParent',
|
|
361
|
-
weight:
|
|
359
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
362
360
|
when: WorkbenchListFocusContextKey,
|
|
363
361
|
handler: (accessor) => {
|
|
364
362
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
@@ -374,7 +372,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
374
372
|
const parent = tree.getParentElement(focus);
|
|
375
373
|
if (parent) {
|
|
376
374
|
navigate(widget, widget => {
|
|
377
|
-
const fakeKeyboardEvent = (
|
|
375
|
+
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
378
376
|
widget.setFocus([parent], fakeKeyboardEvent);
|
|
379
377
|
});
|
|
380
378
|
}
|
|
@@ -382,12 +380,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
382
380
|
});
|
|
383
381
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
384
382
|
id: 'list.expand',
|
|
385
|
-
weight:
|
|
386
|
-
when: (
|
|
387
|
-
|
|
388
|
-
(ContextKeyExpr.or(WorkbenchTreeElementCanExpand, WorkbenchTreeElementHasChild))
|
|
389
|
-
))),
|
|
390
|
-
primary: 17 ,
|
|
383
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
384
|
+
when: ( ContextKeyExpr.and(WorkbenchListFocusContextKey, ( ContextKeyExpr.or(WorkbenchTreeElementCanExpand, WorkbenchTreeElementHasChild)))),
|
|
385
|
+
primary: KeyCode.RightArrow,
|
|
391
386
|
handler: (accessor) => {
|
|
392
387
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
393
388
|
if (!widget) {
|
|
@@ -405,7 +400,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
405
400
|
const node = widget.getNode(child);
|
|
406
401
|
if (node.visible) {
|
|
407
402
|
navigate(widget, widget => {
|
|
408
|
-
const fakeKeyboardEvent = (
|
|
403
|
+
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
409
404
|
widget.setFocus([child], fakeKeyboardEvent);
|
|
410
405
|
});
|
|
411
406
|
}
|
|
@@ -425,7 +420,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
425
420
|
const node = widget.getNode(child);
|
|
426
421
|
if (node.visible) {
|
|
427
422
|
navigate(widget, widget => {
|
|
428
|
-
const fakeKeyboardEvent = (
|
|
423
|
+
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
429
424
|
widget.setFocus([child], fakeKeyboardEvent);
|
|
430
425
|
});
|
|
431
426
|
}
|
|
@@ -464,12 +459,12 @@ function selectElement(accessor, retainCurrentFocus) {
|
|
|
464
459
|
}
|
|
465
460
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
466
461
|
id: 'list.select',
|
|
467
|
-
weight:
|
|
462
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
468
463
|
when: WorkbenchListFocusContextKey,
|
|
469
|
-
primary:
|
|
464
|
+
primary: KeyCode.Enter,
|
|
470
465
|
mac: {
|
|
471
|
-
primary:
|
|
472
|
-
secondary: [
|
|
466
|
+
primary: KeyCode.Enter,
|
|
467
|
+
secondary: [KeyMod.CtrlCmd | KeyCode.DownArrow]
|
|
473
468
|
},
|
|
474
469
|
handler: (accessor) => {
|
|
475
470
|
selectElement(accessor, false);
|
|
@@ -477,12 +472,12 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
477
472
|
});
|
|
478
473
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
479
474
|
id: 'list.stickyScrollselect',
|
|
480
|
-
weight:
|
|
475
|
+
weight: KeybindingWeight.WorkbenchContrib + 50,
|
|
481
476
|
when: WorkbenchTreeStickyScrollFocused,
|
|
482
|
-
primary:
|
|
477
|
+
primary: KeyCode.Enter,
|
|
483
478
|
mac: {
|
|
484
|
-
primary:
|
|
485
|
-
secondary: [
|
|
479
|
+
primary: KeyCode.Enter,
|
|
480
|
+
secondary: [KeyMod.CtrlCmd | KeyCode.DownArrow]
|
|
486
481
|
},
|
|
487
482
|
handler: (accessor) => {
|
|
488
483
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
@@ -494,7 +489,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
494
489
|
});
|
|
495
490
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
496
491
|
id: 'list.selectAndPreserveFocus',
|
|
497
|
-
weight:
|
|
492
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
498
493
|
when: WorkbenchListFocusContextKey,
|
|
499
494
|
handler: accessor => {
|
|
500
495
|
selectElement(accessor, true);
|
|
@@ -502,14 +497,14 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
502
497
|
});
|
|
503
498
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
504
499
|
id: 'list.selectAll',
|
|
505
|
-
weight:
|
|
506
|
-
when: (
|
|
507
|
-
primary:
|
|
500
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
501
|
+
when: ( ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListSupportsMultiSelectContextKey)),
|
|
502
|
+
primary: KeyMod.CtrlCmd | KeyCode.KeyA,
|
|
508
503
|
handler: (accessor) => {
|
|
509
504
|
const focused = accessor.get(IListService).lastFocusedList;
|
|
510
505
|
if (focused instanceof List || focused instanceof PagedList || focused instanceof Table) {
|
|
511
506
|
const list = focused;
|
|
512
|
-
const fakeKeyboardEvent = (
|
|
507
|
+
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
513
508
|
list.setSelection(range(list.length), fakeKeyboardEvent);
|
|
514
509
|
}
|
|
515
510
|
else if (focused instanceof ObjectTree || focused instanceof DataTree || focused instanceof AsyncDataTree) {
|
|
@@ -545,16 +540,16 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
545
540
|
if (scope && selection.length === newSelection.length) {
|
|
546
541
|
newSelection.unshift(scope);
|
|
547
542
|
}
|
|
548
|
-
const fakeKeyboardEvent = (
|
|
543
|
+
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
549
544
|
tree.setSelection(newSelection, fakeKeyboardEvent);
|
|
550
545
|
}
|
|
551
546
|
}
|
|
552
547
|
});
|
|
553
548
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
554
549
|
id: 'list.toggleSelection',
|
|
555
|
-
weight:
|
|
550
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
556
551
|
when: WorkbenchListFocusContextKey,
|
|
557
|
-
primary:
|
|
552
|
+
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Enter,
|
|
558
553
|
handler: (accessor) => {
|
|
559
554
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
560
555
|
if (!widget) {
|
|
@@ -576,8 +571,8 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
576
571
|
});
|
|
577
572
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
578
573
|
id: 'list.showHover',
|
|
579
|
-
weight:
|
|
580
|
-
primary: KeyChord(
|
|
574
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
575
|
+
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyI),
|
|
581
576
|
when: WorkbenchListFocusContextKey,
|
|
582
577
|
handler: async (accessor, ...args) => {
|
|
583
578
|
const listService = accessor.get(IListService);
|
|
@@ -614,9 +609,9 @@ function getCustomHoverForElement(element) {
|
|
|
614
609
|
}
|
|
615
610
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
616
611
|
id: 'list.toggleExpand',
|
|
617
|
-
weight:
|
|
612
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
618
613
|
when: WorkbenchListFocusContextKey,
|
|
619
|
-
primary:
|
|
614
|
+
primary: KeyCode.Space,
|
|
620
615
|
handler: (accessor) => {
|
|
621
616
|
const focused = accessor.get(IListService).lastFocusedList;
|
|
622
617
|
if (focused instanceof ObjectTree || focused instanceof DataTree || focused instanceof AsyncDataTree) {
|
|
@@ -632,9 +627,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
632
627
|
});
|
|
633
628
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
634
629
|
id: 'list.stickyScrolltoggleExpand',
|
|
635
|
-
weight:
|
|
630
|
+
weight: KeybindingWeight.WorkbenchContrib + 50,
|
|
636
631
|
when: WorkbenchTreeStickyScrollFocused,
|
|
637
|
-
primary:
|
|
632
|
+
primary: KeyCode.Space,
|
|
638
633
|
handler: (accessor) => {
|
|
639
634
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
640
635
|
if (!widget || !(widget instanceof ObjectTree || widget instanceof DataTree || widget instanceof AsyncDataTree)) {
|
|
@@ -645,16 +640,16 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
645
640
|
});
|
|
646
641
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
647
642
|
id: 'list.clear',
|
|
648
|
-
weight:
|
|
649
|
-
when: (
|
|
650
|
-
primary:
|
|
643
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
644
|
+
when: ( ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListHasSelectionOrFocus)),
|
|
645
|
+
primary: KeyCode.Escape,
|
|
651
646
|
handler: (accessor) => {
|
|
652
647
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
653
648
|
if (!widget) {
|
|
654
649
|
return;
|
|
655
650
|
}
|
|
656
651
|
const selection = widget.getSelection();
|
|
657
|
-
const fakeKeyboardEvent = (
|
|
652
|
+
const fakeKeyboardEvent = ( new KeyboardEvent('keydown'));
|
|
658
653
|
if (selection.length > 1) {
|
|
659
654
|
const useSelectionNavigation = WorkbenchListSelectionNavigation.getValue(widget.contextKeyService);
|
|
660
655
|
if (useSelectionNavigation) {
|
|
@@ -703,10 +698,10 @@ CommandsRegistry.registerCommandAlias('list.toggleKeyboardNavigation', 'list.tri
|
|
|
703
698
|
CommandsRegistry.registerCommandAlias('list.toggleFilterOnType', 'list.toggleFindMode');
|
|
704
699
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
705
700
|
id: 'list.find',
|
|
706
|
-
weight:
|
|
707
|
-
when: (
|
|
708
|
-
primary:
|
|
709
|
-
secondary: [
|
|
701
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
702
|
+
when: ( ContextKeyExpr.and(RawWorkbenchListFocusContextKey, WorkbenchListSupportsFind)),
|
|
703
|
+
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyF,
|
|
704
|
+
secondary: [KeyCode.F3],
|
|
710
705
|
handler: (accessor) => {
|
|
711
706
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
712
707
|
if (widget instanceof List || widget instanceof PagedList || widget instanceof Table) ;
|
|
@@ -718,9 +713,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
718
713
|
});
|
|
719
714
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
720
715
|
id: 'list.closeFind',
|
|
721
|
-
weight:
|
|
722
|
-
when: (
|
|
723
|
-
primary:
|
|
716
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
717
|
+
when: ( ContextKeyExpr.and(RawWorkbenchListFocusContextKey, WorkbenchTreeFindOpen)),
|
|
718
|
+
primary: KeyCode.Escape,
|
|
724
719
|
handler: (accessor) => {
|
|
725
720
|
const widget = accessor.get(IListService).lastFocusedList;
|
|
726
721
|
if (widget instanceof AbstractTree || widget instanceof AsyncDataTree) {
|
|
@@ -731,9 +726,9 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
731
726
|
});
|
|
732
727
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
733
728
|
id: 'list.scrollUp',
|
|
734
|
-
weight:
|
|
735
|
-
when: (
|
|
736
|
-
primary:
|
|
729
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
730
|
+
when: ( ContextKeyExpr.and(WorkbenchListFocusContextKey, WorkbenchListScrollAtTopContextKey?.negate())),
|
|
731
|
+
primary: KeyMod.CtrlCmd | KeyCode.UpArrow,
|
|
737
732
|
handler: accessor => {
|
|
738
733
|
const focused = accessor.get(IListService).lastFocusedList;
|
|
739
734
|
if (!focused) {
|
|
@@ -744,12 +739,12 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
744
739
|
});
|
|
745
740
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
746
741
|
id: 'list.scrollDown',
|
|
747
|
-
weight:
|
|
748
|
-
when: (
|
|
742
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
743
|
+
when: ( ContextKeyExpr.and(
|
|
749
744
|
WorkbenchListFocusContextKey,
|
|
750
745
|
WorkbenchListScrollAtBottomContextKey?.negate()
|
|
751
|
-
))
|
|
752
|
-
primary:
|
|
746
|
+
)),
|
|
747
|
+
primary: KeyMod.CtrlCmd | KeyCode.DownArrow,
|
|
753
748
|
handler: accessor => {
|
|
754
749
|
const focused = accessor.get(IListService).lastFocusedList;
|
|
755
750
|
if (!focused) {
|
|
@@ -760,7 +755,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
760
755
|
});
|
|
761
756
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
762
757
|
id: 'list.scrollLeft',
|
|
763
|
-
weight:
|
|
758
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
764
759
|
when: WorkbenchListFocusContextKey,
|
|
765
760
|
handler: accessor => {
|
|
766
761
|
const focused = accessor.get(IListService).lastFocusedList;
|
|
@@ -772,7 +767,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
772
767
|
});
|
|
773
768
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
774
769
|
id: 'list.scrollRight',
|
|
775
|
-
weight:
|
|
770
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
776
771
|
when: WorkbenchListFocusContextKey,
|
|
777
772
|
handler: accessor => {
|
|
778
773
|
const focused = accessor.get(IListService).lastFocusedList;
|
|
@@ -787,12 +782,12 @@ registerAction2(class ToggleStickyScroll extends Action2 {
|
|
|
787
782
|
super({
|
|
788
783
|
id: 'tree.toggleStickyScroll',
|
|
789
784
|
title: {
|
|
790
|
-
...( localize2(
|
|
791
|
-
mnemonicTitle: ( localize(
|
|
785
|
+
...( localize2(2602, "Toggle Tree Sticky Scroll")),
|
|
786
|
+
mnemonicTitle: ( localize(2603, "&&Toggle Tree Sticky Scroll")),
|
|
792
787
|
},
|
|
793
788
|
category: 'View',
|
|
794
789
|
metadata: { description: ( localize(
|
|
795
|
-
|
|
790
|
+
2604,
|
|
796
791
|
"Toggles Sticky Scroll widget at the top of tree structures such as the File Explorer and Debug variables View."
|
|
797
792
|
)) },
|
|
798
793
|
f1: true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|