@codingame/monaco-vscode-views-service-override 2.0.2 → 2.0.3

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.
@@ -0,0 +1,1375 @@
1
+ import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
2
+ import { localizeWithPath } from 'vscode/vscode/vs/nls';
3
+ import { EditorPaneDescriptor } from 'vscode/vscode/vs/workbench/browser/editor';
4
+ import { EditorExtensions } from 'vscode/vscode/vs/workbench/common/editor';
5
+ import { IsAuxiliaryEditorPartContext, ActiveEditorGroupLockedContext, MultipleEditorGroupsContext, InEditorZenModeContext, EditorGroupEditorsCountContext, ActiveEditorLastInGroupContext, EditorTabsVisibleContext, ActiveEditorAvailableEditorIdsContext, ActiveEditorPinnedContext, ActiveEditorStickyContext, ActiveEditorCanSplitInGroupContext, SideBySideEditorActiveContext, EditorPartMaximizedEditorGroupContext, EditorPartMultipleEditorGroupsContext, ActiveEditorDirtyContext, TextCompareEditorActiveContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
6
+ import { SideBySideEditorInput, SideBySideEditorInputSerializer } from 'vscode/vscode/vs/workbench/common/editor/sideBySideEditorInput';
7
+ import { TextResourceEditor } from 'vscode/vscode/vs/workbench/browser/parts/editor/textResourceEditor';
8
+ import { SideBySideEditor } from 'vscode/vscode/vs/workbench/browser/parts/editor/sideBySideEditor';
9
+ import { DiffEditorInput, DiffEditorInputSerializer } from 'vscode/vscode/vs/workbench/common/editor/diffEditorInput';
10
+ import { UntitledTextEditorInput } from 'vscode/vscode/vs/workbench/services/untitled/common/untitledTextEditorInput';
11
+ import { TextResourceEditorInput } from 'vscode/vscode/vs/workbench/common/editor/textResourceEditorInput';
12
+ import { TextDiffEditor } from 'vscode/vscode/vs/workbench/browser/parts/editor/textDiffEditor';
13
+ import { BinaryResourceDiffEditor } from 'vscode/vscode/vs/workbench/browser/parts/editor/binaryDiffEditor';
14
+ import { EditorStatusContribution, ChangeLanguageAction, ChangeEOLAction, ChangeEncodingAction } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorStatus';
15
+ import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
16
+ import { registerAction2, MenuRegistry, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
17
+ import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
18
+ import { ShowEditorsInActiveGroupByMostRecentlyUsedAction, ShowAllEditorsByAppearanceAction, ShowAllEditorsByMostRecentlyUsedAction, NavigateForwardAction, NavigateBackwardsAction, OpenNextEditor, OpenPreviousEditor, OpenNextEditorInGroup, OpenPreviousEditorInGroup, OpenFirstEditorInGroup, OpenLastEditorInGroup, OpenNextRecentlyUsedEditorAction, OpenPreviousRecentlyUsedEditorAction, OpenNextRecentlyUsedEditorInGroupAction, OpenPreviousRecentlyUsedEditorInGroupAction, ReopenClosedEditorAction, ClearRecentFilesAction, CloseAllEditorsAction, CloseAllEditorGroupsAction, CloseLeftEditorsInGroupAction, CloseEditorsInOtherGroupsAction, CloseEditorInAllGroupsAction, RevertAndCloseEditorAction, SplitEditorAction, SplitEditorOrthogonalAction, SplitEditorLeftAction, SplitEditorRightAction, SplitEditorUpAction, SplitEditorDownAction, JoinTwoGroupsAction, JoinAllGroupsAction, NavigateBetweenGroupsAction, ResetGroupSizesAction, ToggleGroupSizesAction, MaximizeGroupHideSidebarAction, ToggleMaximizeEditorGroupAction, MinimizeOtherGroupsAction, MinimizeOtherGroupsHideSidebarAction, MoveEditorLeftInGroupAction, MoveEditorRightInGroupAction, MoveGroupLeftAction, MoveGroupRightAction, MoveGroupUpAction, MoveGroupDownAction, DuplicateGroupLeftAction, DuplicateGroupRightAction, DuplicateGroupUpAction, DuplicateGroupDownAction, MoveEditorToPreviousGroupAction, MoveEditorToNextGroupAction, MoveEditorToFirstGroupAction, MoveEditorToLastGroupAction, MoveEditorToLeftGroupAction, MoveEditorToRightGroupAction, MoveEditorToAboveGroupAction, MoveEditorToBelowGroupAction, SplitEditorToPreviousGroupAction, SplitEditorToNextGroupAction, SplitEditorToFirstGroupAction, SplitEditorToLastGroupAction, SplitEditorToLeftGroupAction, SplitEditorToRightGroupAction, SplitEditorToAboveGroupAction, SplitEditorToBelowGroupAction, FocusActiveGroupAction, FocusFirstGroupAction, FocusLastGroupAction, FocusPreviousGroup, FocusNextGroup, FocusLeftGroup, FocusRightGroup, FocusAboveGroup, FocusBelowGroup, NewEditorGroupLeftAction, NewEditorGroupRightAction, NewEditorGroupAboveAction, NewEditorGroupBelowAction, NavigatePreviousAction, NavigateForwardInEditsAction, NavigateBackwardsInEditsAction, NavigatePreviousInEditsAction, NavigateToLastEditLocationAction, NavigateForwardInNavigationsAction, NavigateBackwardsInNavigationsAction, NavigatePreviousInNavigationsAction, NavigateToLastNavigationLocationAction, ClearEditorHistoryAction, EditorLayoutSingleAction, EditorLayoutTwoColumnsAction, EditorLayoutThreeColumnsAction, EditorLayoutTwoRowsAction, EditorLayoutThreeRowsAction, EditorLayoutTwoByTwoGridAction, EditorLayoutTwoRowsRightAction, EditorLayoutTwoColumnsBottomAction, ToggleEditorTypeAction, ReOpenInTextEditorAction, QuickAccessPreviousRecentlyUsedEditorAction, QuickAccessLeastRecentlyUsedEditorAction, QuickAccessPreviousRecentlyUsedEditorInGroupAction, QuickAccessLeastRecentlyUsedEditorInGroupAction, QuickAccessPreviousEditorFromHistoryAction, MoveEditorToNewWindowAction, CopyEditorToNewindowAction, MoveEditorGroupToNewWindowAction, CopyEditorGroupToNewWindowAction, RestoreEditorsToMainWindowAction, NewEmptyEditorWindowAction } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorActions';
19
+ import { setup, LOCK_GROUP_COMMAND_ID, UNLOCK_GROUP_COMMAND_ID, CLOSE_EDITOR_GROUP_COMMAND_ID, SPLIT_EDITOR_UP, SPLIT_EDITOR_DOWN, SPLIT_EDITOR_LEFT, SPLIT_EDITOR_RIGHT, NEW_EMPTY_EDITOR_WINDOW_COMMAND_ID, TOGGLE_LOCK_GROUP_COMMAND_ID, MOVE_EDITOR_GROUP_INTO_NEW_WINDOW_COMMAND_ID, COPY_EDITOR_GROUP_INTO_NEW_WINDOW_COMMAND_ID, CLOSE_EDITOR_COMMAND_ID, CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID, CLOSE_SAVED_EDITORS_COMMAND_ID, CLOSE_EDITORS_IN_GROUP_COMMAND_ID, REOPEN_WITH_COMMAND_ID, KEEP_EDITOR_COMMAND_ID, PIN_EDITOR_COMMAND_ID, UNPIN_EDITOR_COMMAND_ID, SPLIT_EDITOR_IN_GROUP, JOIN_EDITOR_IN_GROUP, MOVE_EDITOR_INTO_NEW_WINDOW_COMMAND_ID, COPY_EDITOR_INTO_NEW_WINDOW_COMMAND_ID, TOGGLE_DIFF_SIDE_BY_SIDE, SHOW_EDITORS_IN_GROUP, TOGGLE_KEEP_EDITORS_COMMAND_ID, TOGGLE_MAXIMIZE_EDITOR_GROUP, SPLIT_EDITOR, TOGGLE_SPLIT_EDITOR_IN_GROUP_LAYOUT, GOTO_PREVIOUS_CHANGE, GOTO_NEXT_CHANGE, TOGGLE_DIFF_IGNORE_TRIM_WHITESPACE, CLOSE_PINNED_EDITOR_COMMAND_ID, CLOSE_EDITORS_AND_GROUP_COMMAND_ID, FOCUS_FIRST_SIDE_EDITOR, FOCUS_SECOND_SIDE_EDITOR } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorCommands';
20
+ import { inQuickPickContext, getQuickNavigateHandler } from 'vscode/vscode/vs/workbench/browser/quickaccess';
21
+ import { KeybindingsRegistry } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
22
+ import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
23
+ import { registerEditorContribution } from 'vscode/vscode/vs/editor/browser/editorExtensions';
24
+ import { FloatingEditorClickMenu } from 'vscode/vscode/vs/workbench/browser/codeeditor';
25
+ import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
26
+ import { Extensions as Extensions$1 } from 'vscode/vscode/vs/platform/quickinput/common/quickAccess';
27
+ import { ActiveGroupEditorsByMostRecentlyUsedQuickAccess, AllEditorsByAppearanceQuickAccess, AllEditorsByMostRecentlyUsedQuickAccess } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorQuickAccess';
28
+ import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
29
+ import { registerIcon } from 'vscode/vscode/vs/platform/theme/common/iconRegistry';
30
+ import { UntitledTextEditorInputSerializer, UntitledTextEditorWorkingCopyEditorHandler } from '../../../services/untitled/common/untitledTextEditorHandler.js';
31
+ import { DynamicEditorConfigurations } from './editorConfiguration.js';
32
+ import { ShowMultipleEditorTabsAction, ShowSingleEditorTabAction, HideEditorTabsAction, EditorActionsDefaultAction, EditorActionsTitleBarAction, HideEditorActionsAction } from 'vscode/vscode/vs/workbench/browser/actions/layoutActions';
33
+ import { EditorContextKeys } from 'vscode/vscode/vs/editor/common/editorContextKeys';
34
+ import 'vscode/vscode/vs/workbench/browser/parts/editor/editor.autosave.contribution';
35
+
36
+ ( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(TextResourceEditor, TextResourceEditor.ID, ( localizeWithPath(
37
+ 'vs/workbench/browser/parts/editor/editor.contribution',
38
+ 'textEditor',
39
+ "Text Editor"
40
+ ))), [
41
+ ( new SyncDescriptor(UntitledTextEditorInput)),
42
+ ( new SyncDescriptor(TextResourceEditorInput))
43
+ ]);
44
+ ( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(TextDiffEditor, TextDiffEditor.ID, ( localizeWithPath(
45
+ 'vs/workbench/browser/parts/editor/editor.contribution',
46
+ 'textDiffEditor',
47
+ "Text Diff Editor"
48
+ ))), [
49
+ ( new SyncDescriptor(DiffEditorInput))
50
+ ]);
51
+ ( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(BinaryResourceDiffEditor, BinaryResourceDiffEditor.ID, ( localizeWithPath(
52
+ 'vs/workbench/browser/parts/editor/editor.contribution',
53
+ 'binaryDiffEditor',
54
+ "Binary Diff Editor"
55
+ ))), [
56
+ ( new SyncDescriptor(DiffEditorInput))
57
+ ]);
58
+ ( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(SideBySideEditor, SideBySideEditor.ID, ( localizeWithPath(
59
+ 'vs/workbench/browser/parts/editor/editor.contribution',
60
+ 'sideBySideEditor',
61
+ "Side by Side Editor"
62
+ ))), [
63
+ ( new SyncDescriptor(SideBySideEditorInput))
64
+ ]);
65
+ ( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(UntitledTextEditorInput.ID, UntitledTextEditorInputSerializer);
66
+ ( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(SideBySideEditorInput.ID, SideBySideEditorInputSerializer);
67
+ ( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(DiffEditorInput.ID, DiffEditorInputSerializer);
68
+ ( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(EditorStatusContribution, 2 );
69
+ ( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(UntitledTextEditorWorkingCopyEditorHandler, 2 );
70
+ ( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(DynamicEditorConfigurations, 2 );
71
+ registerEditorContribution(FloatingEditorClickMenu.ID, FloatingEditorClickMenu, 1 );
72
+ const quickAccessRegistry = ( Registry.as(Extensions$1.Quickaccess));
73
+ const editorPickerContextKey = 'inEditorsPicker';
74
+ const editorPickerContext = ( ContextKeyExpr.and(inQuickPickContext, ( ContextKeyExpr.has(editorPickerContextKey))));
75
+ quickAccessRegistry.registerQuickAccessProvider({
76
+ ctor: ActiveGroupEditorsByMostRecentlyUsedQuickAccess,
77
+ prefix: ActiveGroupEditorsByMostRecentlyUsedQuickAccess.PREFIX,
78
+ contextKey: editorPickerContextKey,
79
+ placeholder: ( localizeWithPath(
80
+ 'vs/workbench/browser/parts/editor/editor.contribution',
81
+ 'editorQuickAccessPlaceholder',
82
+ "Type the name of an editor to open it."
83
+ )),
84
+ helpEntries: [{ description: ( localizeWithPath(
85
+ 'vs/workbench/browser/parts/editor/editor.contribution',
86
+ 'activeGroupEditorsByMostRecentlyUsedQuickAccess',
87
+ "Show Editors in Active Group by Most Recently Used"
88
+ )), commandId: ShowEditorsInActiveGroupByMostRecentlyUsedAction.ID }]
89
+ });
90
+ quickAccessRegistry.registerQuickAccessProvider({
91
+ ctor: AllEditorsByAppearanceQuickAccess,
92
+ prefix: AllEditorsByAppearanceQuickAccess.PREFIX,
93
+ contextKey: editorPickerContextKey,
94
+ placeholder: ( localizeWithPath(
95
+ 'vs/workbench/browser/parts/editor/editor.contribution',
96
+ 'editorQuickAccessPlaceholder',
97
+ "Type the name of an editor to open it."
98
+ )),
99
+ helpEntries: [{ description: ( localizeWithPath(
100
+ 'vs/workbench/browser/parts/editor/editor.contribution',
101
+ 'allEditorsByAppearanceQuickAccess',
102
+ "Show All Opened Editors By Appearance"
103
+ )), commandId: ShowAllEditorsByAppearanceAction.ID }]
104
+ });
105
+ quickAccessRegistry.registerQuickAccessProvider({
106
+ ctor: AllEditorsByMostRecentlyUsedQuickAccess,
107
+ prefix: AllEditorsByMostRecentlyUsedQuickAccess.PREFIX,
108
+ contextKey: editorPickerContextKey,
109
+ placeholder: ( localizeWithPath(
110
+ 'vs/workbench/browser/parts/editor/editor.contribution',
111
+ 'editorQuickAccessPlaceholder',
112
+ "Type the name of an editor to open it."
113
+ )),
114
+ helpEntries: [{ description: ( localizeWithPath(
115
+ 'vs/workbench/browser/parts/editor/editor.contribution',
116
+ 'allEditorsByMostRecentlyUsedQuickAccess',
117
+ "Show All Opened Editors By Most Recently Used"
118
+ )), commandId: ShowAllEditorsByMostRecentlyUsedAction.ID }]
119
+ });
120
+ registerAction2(ChangeLanguageAction);
121
+ registerAction2(ChangeEOLAction);
122
+ registerAction2(ChangeEncodingAction);
123
+ registerAction2(NavigateForwardAction);
124
+ registerAction2(NavigateBackwardsAction);
125
+ registerAction2(OpenNextEditor);
126
+ registerAction2(OpenPreviousEditor);
127
+ registerAction2(OpenNextEditorInGroup);
128
+ registerAction2(OpenPreviousEditorInGroup);
129
+ registerAction2(OpenFirstEditorInGroup);
130
+ registerAction2(OpenLastEditorInGroup);
131
+ registerAction2(OpenNextRecentlyUsedEditorAction);
132
+ registerAction2(OpenPreviousRecentlyUsedEditorAction);
133
+ registerAction2(OpenNextRecentlyUsedEditorInGroupAction);
134
+ registerAction2(OpenPreviousRecentlyUsedEditorInGroupAction);
135
+ registerAction2(ReopenClosedEditorAction);
136
+ registerAction2(ClearRecentFilesAction);
137
+ registerAction2(ShowAllEditorsByAppearanceAction);
138
+ registerAction2(ShowAllEditorsByMostRecentlyUsedAction);
139
+ registerAction2(ShowEditorsInActiveGroupByMostRecentlyUsedAction);
140
+ registerAction2(CloseAllEditorsAction);
141
+ registerAction2(CloseAllEditorGroupsAction);
142
+ registerAction2(CloseLeftEditorsInGroupAction);
143
+ registerAction2(CloseEditorsInOtherGroupsAction);
144
+ registerAction2(CloseEditorInAllGroupsAction);
145
+ registerAction2(RevertAndCloseEditorAction);
146
+ registerAction2(SplitEditorAction);
147
+ registerAction2(SplitEditorOrthogonalAction);
148
+ registerAction2(SplitEditorLeftAction);
149
+ registerAction2(SplitEditorRightAction);
150
+ registerAction2(SplitEditorUpAction);
151
+ registerAction2(SplitEditorDownAction);
152
+ registerAction2(JoinTwoGroupsAction);
153
+ registerAction2(JoinAllGroupsAction);
154
+ registerAction2(NavigateBetweenGroupsAction);
155
+ registerAction2(ResetGroupSizesAction);
156
+ registerAction2(ToggleGroupSizesAction);
157
+ registerAction2(MaximizeGroupHideSidebarAction);
158
+ registerAction2(ToggleMaximizeEditorGroupAction);
159
+ registerAction2(MinimizeOtherGroupsAction);
160
+ registerAction2(MinimizeOtherGroupsHideSidebarAction);
161
+ registerAction2(MoveEditorLeftInGroupAction);
162
+ registerAction2(MoveEditorRightInGroupAction);
163
+ registerAction2(MoveGroupLeftAction);
164
+ registerAction2(MoveGroupRightAction);
165
+ registerAction2(MoveGroupUpAction);
166
+ registerAction2(MoveGroupDownAction);
167
+ registerAction2(DuplicateGroupLeftAction);
168
+ registerAction2(DuplicateGroupRightAction);
169
+ registerAction2(DuplicateGroupUpAction);
170
+ registerAction2(DuplicateGroupDownAction);
171
+ registerAction2(MoveEditorToPreviousGroupAction);
172
+ registerAction2(MoveEditorToNextGroupAction);
173
+ registerAction2(MoveEditorToFirstGroupAction);
174
+ registerAction2(MoveEditorToLastGroupAction);
175
+ registerAction2(MoveEditorToLeftGroupAction);
176
+ registerAction2(MoveEditorToRightGroupAction);
177
+ registerAction2(MoveEditorToAboveGroupAction);
178
+ registerAction2(MoveEditorToBelowGroupAction);
179
+ registerAction2(SplitEditorToPreviousGroupAction);
180
+ registerAction2(SplitEditorToNextGroupAction);
181
+ registerAction2(SplitEditorToFirstGroupAction);
182
+ registerAction2(SplitEditorToLastGroupAction);
183
+ registerAction2(SplitEditorToLeftGroupAction);
184
+ registerAction2(SplitEditorToRightGroupAction);
185
+ registerAction2(SplitEditorToAboveGroupAction);
186
+ registerAction2(SplitEditorToBelowGroupAction);
187
+ registerAction2(FocusActiveGroupAction);
188
+ registerAction2(FocusFirstGroupAction);
189
+ registerAction2(FocusLastGroupAction);
190
+ registerAction2(FocusPreviousGroup);
191
+ registerAction2(FocusNextGroup);
192
+ registerAction2(FocusLeftGroup);
193
+ registerAction2(FocusRightGroup);
194
+ registerAction2(FocusAboveGroup);
195
+ registerAction2(FocusBelowGroup);
196
+ registerAction2(NewEditorGroupLeftAction);
197
+ registerAction2(NewEditorGroupRightAction);
198
+ registerAction2(NewEditorGroupAboveAction);
199
+ registerAction2(NewEditorGroupBelowAction);
200
+ registerAction2(NavigatePreviousAction);
201
+ registerAction2(NavigateForwardInEditsAction);
202
+ registerAction2(NavigateBackwardsInEditsAction);
203
+ registerAction2(NavigatePreviousInEditsAction);
204
+ registerAction2(NavigateToLastEditLocationAction);
205
+ registerAction2(NavigateForwardInNavigationsAction);
206
+ registerAction2(NavigateBackwardsInNavigationsAction);
207
+ registerAction2(NavigatePreviousInNavigationsAction);
208
+ registerAction2(NavigateToLastNavigationLocationAction);
209
+ registerAction2(ClearEditorHistoryAction);
210
+ registerAction2(EditorLayoutSingleAction);
211
+ registerAction2(EditorLayoutTwoColumnsAction);
212
+ registerAction2(EditorLayoutThreeColumnsAction);
213
+ registerAction2(EditorLayoutTwoRowsAction);
214
+ registerAction2(EditorLayoutThreeRowsAction);
215
+ registerAction2(EditorLayoutTwoByTwoGridAction);
216
+ registerAction2(EditorLayoutTwoRowsRightAction);
217
+ registerAction2(EditorLayoutTwoColumnsBottomAction);
218
+ registerAction2(ToggleEditorTypeAction);
219
+ registerAction2(ReOpenInTextEditorAction);
220
+ registerAction2(QuickAccessPreviousRecentlyUsedEditorAction);
221
+ registerAction2(QuickAccessLeastRecentlyUsedEditorAction);
222
+ registerAction2(QuickAccessPreviousRecentlyUsedEditorInGroupAction);
223
+ registerAction2(QuickAccessLeastRecentlyUsedEditorInGroupAction);
224
+ registerAction2(QuickAccessPreviousEditorFromHistoryAction);
225
+ registerAction2(MoveEditorToNewWindowAction);
226
+ registerAction2(CopyEditorToNewindowAction);
227
+ registerAction2(MoveEditorGroupToNewWindowAction);
228
+ registerAction2(CopyEditorGroupToNewWindowAction);
229
+ registerAction2(RestoreEditorsToMainWindowAction);
230
+ registerAction2(NewEmptyEditorWindowAction);
231
+ const quickAccessNavigateNextInEditorPickerId = 'workbench.action.quickOpenNavigateNextInEditorPicker';
232
+ KeybindingsRegistry.registerCommandAndKeybindingRule({
233
+ id: quickAccessNavigateNextInEditorPickerId,
234
+ weight: 200 + 50,
235
+ handler: getQuickNavigateHandler(quickAccessNavigateNextInEditorPickerId, true),
236
+ when: editorPickerContext,
237
+ primary: 2048 | 2 ,
238
+ mac: { primary: 256 | 2 }
239
+ });
240
+ const quickAccessNavigatePreviousInEditorPickerId = 'workbench.action.quickOpenNavigatePreviousInEditorPicker';
241
+ KeybindingsRegistry.registerCommandAndKeybindingRule({
242
+ id: quickAccessNavigatePreviousInEditorPickerId,
243
+ weight: 200 + 50,
244
+ handler: getQuickNavigateHandler(quickAccessNavigatePreviousInEditorPickerId, false),
245
+ when: editorPickerContext,
246
+ primary: 2048 | 1024 | 2 ,
247
+ mac: { primary: 256 | 1024 | 2 }
248
+ });
249
+ setup();
250
+ MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroup, { command: { id: LOCK_GROUP_COMMAND_ID, title: ( localizeWithPath(
251
+ 'vs/workbench/browser/parts/editor/editor.contribution',
252
+ 'lockGroupAction',
253
+ "Lock Group"
254
+ )), icon: Codicon.unlock }, group: 'navigation', order: 10, when: ( ContextKeyExpr.and(IsAuxiliaryEditorPartContext, ( ActiveEditorGroupLockedContext.toNegated()))) });
255
+ MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroup, { command: { id: UNLOCK_GROUP_COMMAND_ID, title: ( localizeWithPath(
256
+ 'vs/workbench/browser/parts/editor/editor.contribution',
257
+ 'unlockGroupAction',
258
+ "Unlock Group"
259
+ )), icon: Codicon.lock, toggled: ContextKeyExpr.true() }, group: 'navigation', order: 10, when: ActiveEditorGroupLockedContext });
260
+ MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroup, { command: { id: CLOSE_EDITOR_GROUP_COMMAND_ID, title: ( localizeWithPath(
261
+ 'vs/workbench/browser/parts/editor/editor.contribution',
262
+ 'closeGroupAction',
263
+ "Close Group"
264
+ )), icon: Codicon.close }, group: 'navigation', order: 20 });
265
+ MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: SPLIT_EDITOR_UP, title: ( localizeWithPath(
266
+ 'vs/workbench/browser/parts/editor/editor.contribution',
267
+ 'splitUp',
268
+ "Split Up"
269
+ )) }, group: '2_split', order: 10 });
270
+ MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: SPLIT_EDITOR_DOWN, title: ( localizeWithPath(
271
+ 'vs/workbench/browser/parts/editor/editor.contribution',
272
+ 'splitDown',
273
+ "Split Down"
274
+ )) }, group: '2_split', order: 20 });
275
+ MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: SPLIT_EDITOR_LEFT, title: ( localizeWithPath(
276
+ 'vs/workbench/browser/parts/editor/editor.contribution',
277
+ 'splitLeft',
278
+ "Split Left"
279
+ )) }, group: '2_split', order: 30 });
280
+ MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: SPLIT_EDITOR_RIGHT, title: ( localizeWithPath(
281
+ 'vs/workbench/browser/parts/editor/editor.contribution',
282
+ 'splitRight',
283
+ "Split Right"
284
+ )) }, group: '2_split', order: 40 });
285
+ MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: NEW_EMPTY_EDITOR_WINDOW_COMMAND_ID, title: ( localizeWithPath(
286
+ 'vs/workbench/browser/parts/editor/editor.contribution',
287
+ 'newWindow',
288
+ "New Window"
289
+ )) }, group: '3_window', order: 10 });
290
+ MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: TOGGLE_LOCK_GROUP_COMMAND_ID, title: ( localizeWithPath(
291
+ 'vs/workbench/browser/parts/editor/editor.contribution',
292
+ 'toggleLockGroup',
293
+ "Lock Group"
294
+ )), toggled: ActiveEditorGroupLockedContext }, group: '4_lock', order: 10, when: ( ContextKeyExpr.and(MultipleEditorGroupsContext, ( IsAuxiliaryEditorPartContext.toNegated()))) });
295
+ MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: CLOSE_EDITOR_GROUP_COMMAND_ID, title: ( localizeWithPath('vs/workbench/browser/parts/editor/editor.contribution', 'close', "Close")) }, group: '5_close', order: 10, when: MultipleEditorGroupsContext });
296
+ MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { command: { id: SPLIT_EDITOR_UP, title: ( localizeWithPath(
297
+ 'vs/workbench/browser/parts/editor/editor.contribution',
298
+ 'splitUp',
299
+ "Split Up"
300
+ )) }, group: '2_split', order: 10 });
301
+ MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { command: { id: SPLIT_EDITOR_DOWN, title: ( localizeWithPath(
302
+ 'vs/workbench/browser/parts/editor/editor.contribution',
303
+ 'splitDown',
304
+ "Split Down"
305
+ )) }, group: '2_split', order: 20 });
306
+ MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { command: { id: SPLIT_EDITOR_LEFT, title: ( localizeWithPath(
307
+ 'vs/workbench/browser/parts/editor/editor.contribution',
308
+ 'splitLeft',
309
+ "Split Left"
310
+ )) }, group: '2_split', order: 30 });
311
+ MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { command: { id: SPLIT_EDITOR_RIGHT, title: ( localizeWithPath(
312
+ 'vs/workbench/browser/parts/editor/editor.contribution',
313
+ 'splitRight',
314
+ "Split Right"
315
+ )) }, group: '2_split', order: 40 });
316
+ MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { command: { id: MOVE_EDITOR_GROUP_INTO_NEW_WINDOW_COMMAND_ID, title: ( localizeWithPath(
317
+ 'vs/workbench/browser/parts/editor/editor.contribution',
318
+ 'moveEditorGroupToNewWindow',
319
+ "Move into New Window"
320
+ )) }, group: '3_window', order: 10 });
321
+ MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { command: { id: COPY_EDITOR_GROUP_INTO_NEW_WINDOW_COMMAND_ID, title: ( localizeWithPath(
322
+ 'vs/workbench/browser/parts/editor/editor.contribution',
323
+ 'copyEditorGroupToNewWindow',
324
+ "Copy into New Window"
325
+ )) }, group: '3_window', order: 20 });
326
+ MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { submenu: MenuId.EditorTabsBarShowTabsSubmenu, title: ( localizeWithPath(
327
+ 'vs/workbench/browser/parts/editor/editor.contribution',
328
+ 'tabBar',
329
+ "Tab Bar"
330
+ )), group: '4_config', order: 10, when: ( InEditorZenModeContext.negate()) });
331
+ MenuRegistry.appendMenuItem(MenuId.EditorTabsBarShowTabsSubmenu, { command: { id: ShowMultipleEditorTabsAction.ID, title: ( localizeWithPath(
332
+ 'vs/workbench/browser/parts/editor/editor.contribution',
333
+ 'multipleTabs',
334
+ "Multiple Tabs"
335
+ )), toggled: ( ContextKeyExpr.equals('config.workbench.editor.showTabs', 'multiple')) }, group: '1_config', order: 10 });
336
+ MenuRegistry.appendMenuItem(MenuId.EditorTabsBarShowTabsSubmenu, { command: { id: ShowSingleEditorTabAction.ID, title: ( localizeWithPath(
337
+ 'vs/workbench/browser/parts/editor/editor.contribution',
338
+ 'singleTab',
339
+ "Single Tab"
340
+ )), toggled: ( ContextKeyExpr.equals('config.workbench.editor.showTabs', 'single')) }, group: '1_config', order: 20 });
341
+ MenuRegistry.appendMenuItem(MenuId.EditorTabsBarShowTabsSubmenu, { command: { id: HideEditorTabsAction.ID, title: ( localizeWithPath(
342
+ 'vs/workbench/browser/parts/editor/editor.contribution',
343
+ 'hideTabs',
344
+ "Hidden"
345
+ )), toggled: ( ContextKeyExpr.equals('config.workbench.editor.showTabs', 'none')) }, group: '1_config', order: 30 });
346
+ MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { submenu: MenuId.EditorActionsPositionSubmenu, title: ( localizeWithPath(
347
+ 'vs/workbench/browser/parts/editor/editor.contribution',
348
+ 'editorActionsPosition',
349
+ "Editor Actions Position"
350
+ )), group: '4_config', order: 20 });
351
+ MenuRegistry.appendMenuItem(MenuId.EditorActionsPositionSubmenu, { command: { id: EditorActionsDefaultAction.ID, title: ( localizeWithPath(
352
+ 'vs/workbench/browser/parts/editor/editor.contribution',
353
+ 'tabBar',
354
+ "Tab Bar"
355
+ )), toggled: ( ContextKeyExpr.equals('config.workbench.editor.editorActionsLocation', 'default')) }, group: '1_config', order: 10, when: ( ( ContextKeyExpr.equals('config.workbench.editor.showTabs', 'none')).negate()) });
356
+ MenuRegistry.appendMenuItem(MenuId.EditorActionsPositionSubmenu, { command: { id: EditorActionsTitleBarAction.ID, title: ( localizeWithPath(
357
+ 'vs/workbench/browser/parts/editor/editor.contribution',
358
+ 'titleBar',
359
+ "Title Bar"
360
+ )), toggled: ( ContextKeyExpr.or(( ContextKeyExpr.equals('config.workbench.editor.editorActionsLocation', 'titleBar')), ( ContextKeyExpr.and(( ContextKeyExpr.equals('config.workbench.editor.showTabs', 'none')), ( ContextKeyExpr.equals('config.workbench.editor.editorActionsLocation', 'default')))))) }, group: '1_config', order: 20, when: ( ( ContextKeyExpr.equals('config.window.titleBarStyle', 'native')).negate()) });
361
+ MenuRegistry.appendMenuItem(MenuId.EditorActionsPositionSubmenu, { command: { id: HideEditorActionsAction.ID, title: ( localizeWithPath(
362
+ 'vs/workbench/browser/parts/editor/editor.contribution',
363
+ 'hidden',
364
+ "Hidden"
365
+ )), toggled: ( ContextKeyExpr.or(( ContextKeyExpr.equals('config.workbench.editor.editorActionsLocation', 'hidden')), ( ContextKeyExpr.and(( ContextKeyExpr.equals('config.window.titleBarStyle', 'native')), ( ContextKeyExpr.equals('config.workbench.editor.editorActionsLocation', 'titleBar')))))) }, group: '1_config', order: 30 });
366
+ MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: CLOSE_EDITOR_COMMAND_ID, title: ( localizeWithPath('vs/workbench/browser/parts/editor/editor.contribution', 'close', "Close")) }, group: '1_close', order: 10 });
367
+ MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, title: ( localizeWithPath(
368
+ 'vs/workbench/browser/parts/editor/editor.contribution',
369
+ 'closeOthers',
370
+ "Close Others"
371
+ )), precondition: ( EditorGroupEditorsCountContext.notEqualsTo('1')) }, group: '1_close', order: 20 });
372
+ MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID, title: ( localizeWithPath(
373
+ 'vs/workbench/browser/parts/editor/editor.contribution',
374
+ 'closeRight',
375
+ "Close to the Right"
376
+ )), precondition: ( ActiveEditorLastInGroupContext.toNegated()) }, group: '1_close', order: 30, when: EditorTabsVisibleContext });
377
+ MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: CLOSE_SAVED_EDITORS_COMMAND_ID, title: ( localizeWithPath(
378
+ 'vs/workbench/browser/parts/editor/editor.contribution',
379
+ 'closeAllSaved',
380
+ "Close Saved"
381
+ )) }, group: '1_close', order: 40 });
382
+ MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID, title: ( localizeWithPath(
383
+ 'vs/workbench/browser/parts/editor/editor.contribution',
384
+ 'closeAll',
385
+ "Close All"
386
+ )) }, group: '1_close', order: 50 });
387
+ MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: REOPEN_WITH_COMMAND_ID, title: ( localizeWithPath(
388
+ 'vs/workbench/browser/parts/editor/editor.contribution',
389
+ 'reopenWith',
390
+ "Reopen Editor With..."
391
+ )) }, group: '1_open', order: 10, when: ActiveEditorAvailableEditorIdsContext });
392
+ MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: KEEP_EDITOR_COMMAND_ID, title: ( localizeWithPath(
393
+ 'vs/workbench/browser/parts/editor/editor.contribution',
394
+ 'keepOpen',
395
+ "Keep Open"
396
+ )), precondition: ( ActiveEditorPinnedContext.toNegated()) }, group: '3_preview', order: 10, when: ( ContextKeyExpr.has('config.workbench.editor.enablePreview')) });
397
+ MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: PIN_EDITOR_COMMAND_ID, title: ( localizeWithPath('vs/workbench/browser/parts/editor/editor.contribution', 'pin', "Pin")) }, group: '3_preview', order: 20, when: ( ActiveEditorStickyContext.toNegated()) });
398
+ MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: UNPIN_EDITOR_COMMAND_ID, title: ( localizeWithPath('vs/workbench/browser/parts/editor/editor.contribution', 'unpin', "Unpin")) }, group: '3_preview', order: 20, when: ActiveEditorStickyContext });
399
+ MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: SPLIT_EDITOR_UP, title: ( localizeWithPath(
400
+ 'vs/workbench/browser/parts/editor/editor.contribution',
401
+ 'splitUp',
402
+ "Split Up"
403
+ )) }, group: '5_split', order: 10 });
404
+ MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: SPLIT_EDITOR_DOWN, title: ( localizeWithPath(
405
+ 'vs/workbench/browser/parts/editor/editor.contribution',
406
+ 'splitDown',
407
+ "Split Down"
408
+ )) }, group: '5_split', order: 20 });
409
+ MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: SPLIT_EDITOR_LEFT, title: ( localizeWithPath(
410
+ 'vs/workbench/browser/parts/editor/editor.contribution',
411
+ 'splitLeft',
412
+ "Split Left"
413
+ )) }, group: '5_split', order: 30 });
414
+ MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: SPLIT_EDITOR_RIGHT, title: ( localizeWithPath(
415
+ 'vs/workbench/browser/parts/editor/editor.contribution',
416
+ 'splitRight',
417
+ "Split Right"
418
+ )) }, group: '5_split', order: 40 });
419
+ MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: SPLIT_EDITOR_IN_GROUP, title: ( localizeWithPath(
420
+ 'vs/workbench/browser/parts/editor/editor.contribution',
421
+ 'splitInGroup',
422
+ "Split in Group"
423
+ )) }, group: '5_split', order: 50, when: ActiveEditorCanSplitInGroupContext });
424
+ MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: JOIN_EDITOR_IN_GROUP, title: ( localizeWithPath(
425
+ 'vs/workbench/browser/parts/editor/editor.contribution',
426
+ 'joinInGroup',
427
+ "Join in Group"
428
+ )) }, group: '5_split', order: 50, when: SideBySideEditorActiveContext });
429
+ MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: MOVE_EDITOR_INTO_NEW_WINDOW_COMMAND_ID, title: ( localizeWithPath(
430
+ 'vs/workbench/browser/parts/editor/editor.contribution',
431
+ 'moveToNewWindow',
432
+ "Move into New Window"
433
+ )) }, group: '6_new_window', order: 10 });
434
+ MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: COPY_EDITOR_INTO_NEW_WINDOW_COMMAND_ID, title: ( localizeWithPath(
435
+ 'vs/workbench/browser/parts/editor/editor.contribution',
436
+ 'copyToNewWindow',
437
+ "Copy into New Window"
438
+ )) }, group: '6_new_window', order: 20 });
439
+ MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: TOGGLE_DIFF_SIDE_BY_SIDE, title: ( localizeWithPath(
440
+ 'vs/workbench/browser/parts/editor/editor.contribution',
441
+ 'inlineView',
442
+ "Inline View"
443
+ )), toggled: ( ContextKeyExpr.equals('config.diffEditor.renderSideBySide', false)) }, group: '1_diff', order: 10, when: ( ContextKeyExpr.has('isInDiffEditor')) });
444
+ MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: SHOW_EDITORS_IN_GROUP, title: ( localizeWithPath(
445
+ 'vs/workbench/browser/parts/editor/editor.contribution',
446
+ 'showOpenedEditors',
447
+ "Show Opened Editors"
448
+ )) }, group: '3_open', order: 10 });
449
+ MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID, title: ( localizeWithPath(
450
+ 'vs/workbench/browser/parts/editor/editor.contribution',
451
+ 'closeAll',
452
+ "Close All"
453
+ )) }, group: '5_close', order: 10 });
454
+ MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: CLOSE_SAVED_EDITORS_COMMAND_ID, title: ( localizeWithPath(
455
+ 'vs/workbench/browser/parts/editor/editor.contribution',
456
+ 'closeAllSaved',
457
+ "Close Saved"
458
+ )) }, group: '5_close', order: 20 });
459
+ MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: TOGGLE_KEEP_EDITORS_COMMAND_ID, title: ( localizeWithPath(
460
+ 'vs/workbench/browser/parts/editor/editor.contribution',
461
+ 'togglePreviewMode',
462
+ "Enable Preview Editors"
463
+ )), toggled: ( ContextKeyExpr.has('config.workbench.editor.enablePreview')) }, group: '7_settings', order: 10 });
464
+ MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: TOGGLE_MAXIMIZE_EDITOR_GROUP, title: ( localizeWithPath(
465
+ 'vs/workbench/browser/parts/editor/editor.contribution',
466
+ 'maximizeGroup',
467
+ "Maximize Group"
468
+ )) }, group: '8_group_operations', order: 5, when: ( ContextKeyExpr.and(( EditorPartMaximizedEditorGroupContext.negate()), EditorPartMultipleEditorGroupsContext)) });
469
+ MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: TOGGLE_MAXIMIZE_EDITOR_GROUP, title: ( localizeWithPath(
470
+ 'vs/workbench/browser/parts/editor/editor.contribution',
471
+ 'unmaximizeGroup',
472
+ "Unmaximize Group"
473
+ )) }, group: '8_group_operations', order: 5, when: EditorPartMaximizedEditorGroupContext });
474
+ MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: TOGGLE_LOCK_GROUP_COMMAND_ID, title: ( localizeWithPath(
475
+ 'vs/workbench/browser/parts/editor/editor.contribution',
476
+ 'lockGroup',
477
+ "Lock Group"
478
+ )), toggled: ActiveEditorGroupLockedContext }, group: '8_group_operations', order: 10, when: ( ContextKeyExpr.and(MultipleEditorGroupsContext, ( IsAuxiliaryEditorPartContext.toNegated()))) });
479
+ function appendEditorToolItem(primary, when, order, alternative, precondition) {
480
+ const item = {
481
+ command: {
482
+ id: primary.id,
483
+ title: primary.title,
484
+ icon: primary.icon,
485
+ toggled: primary.toggled,
486
+ precondition
487
+ },
488
+ group: 'navigation',
489
+ when,
490
+ order
491
+ };
492
+ if (alternative) {
493
+ item.alt = {
494
+ id: alternative.id,
495
+ title: alternative.title,
496
+ icon: alternative.icon
497
+ };
498
+ }
499
+ MenuRegistry.appendMenuItem(MenuId.EditorTitle, item);
500
+ }
501
+ const SPLIT_ORDER = 100000;
502
+ const CLOSE_ORDER = 1000000;
503
+ appendEditorToolItem({
504
+ id: SPLIT_EDITOR,
505
+ title: ( localizeWithPath(
506
+ 'vs/workbench/browser/parts/editor/editor.contribution',
507
+ 'splitEditorRight',
508
+ "Split Editor Right"
509
+ )),
510
+ icon: Codicon.splitHorizontal
511
+ }, ContextKeyExpr.not('splitEditorsVertically'), SPLIT_ORDER, {
512
+ id: SPLIT_EDITOR_DOWN,
513
+ title: ( localizeWithPath(
514
+ 'vs/workbench/browser/parts/editor/editor.contribution',
515
+ 'splitEditorDown',
516
+ "Split Editor Down"
517
+ )),
518
+ icon: Codicon.splitVertical
519
+ });
520
+ appendEditorToolItem({
521
+ id: SPLIT_EDITOR,
522
+ title: ( localizeWithPath(
523
+ 'vs/workbench/browser/parts/editor/editor.contribution',
524
+ 'splitEditorDown',
525
+ "Split Editor Down"
526
+ )),
527
+ icon: Codicon.splitVertical
528
+ }, ( ContextKeyExpr.has('splitEditorsVertically')), SPLIT_ORDER, {
529
+ id: SPLIT_EDITOR_RIGHT,
530
+ title: ( localizeWithPath(
531
+ 'vs/workbench/browser/parts/editor/editor.contribution',
532
+ 'splitEditorRight',
533
+ "Split Editor Right"
534
+ )),
535
+ icon: Codicon.splitHorizontal
536
+ });
537
+ appendEditorToolItem({
538
+ id: TOGGLE_SPLIT_EDITOR_IN_GROUP_LAYOUT,
539
+ title: ( localizeWithPath(
540
+ 'vs/workbench/browser/parts/editor/editor.contribution',
541
+ 'toggleSplitEditorInGroupLayout',
542
+ "Toggle Layout"
543
+ )),
544
+ icon: Codicon.editorLayout
545
+ }, SideBySideEditorActiveContext, SPLIT_ORDER - 1);
546
+ appendEditorToolItem({
547
+ id: CLOSE_EDITOR_COMMAND_ID,
548
+ title: ( localizeWithPath('vs/workbench/browser/parts/editor/editor.contribution', 'close', "Close")),
549
+ icon: Codicon.close
550
+ }, ( ContextKeyExpr.and(( EditorTabsVisibleContext.toNegated()), ( ActiveEditorDirtyContext.toNegated()), ( ActiveEditorStickyContext.toNegated()))), CLOSE_ORDER, {
551
+ id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID,
552
+ title: ( localizeWithPath(
553
+ 'vs/workbench/browser/parts/editor/editor.contribution',
554
+ 'closeAll',
555
+ "Close All"
556
+ )),
557
+ icon: Codicon.closeAll
558
+ });
559
+ appendEditorToolItem({
560
+ id: CLOSE_EDITOR_COMMAND_ID,
561
+ title: ( localizeWithPath('vs/workbench/browser/parts/editor/editor.contribution', 'close', "Close")),
562
+ icon: Codicon.closeDirty
563
+ }, ( ContextKeyExpr.and(( EditorTabsVisibleContext.toNegated()), ActiveEditorDirtyContext, ( ActiveEditorStickyContext.toNegated()))), CLOSE_ORDER, {
564
+ id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID,
565
+ title: ( localizeWithPath(
566
+ 'vs/workbench/browser/parts/editor/editor.contribution',
567
+ 'closeAll',
568
+ "Close All"
569
+ )),
570
+ icon: Codicon.closeAll
571
+ });
572
+ appendEditorToolItem({
573
+ id: UNPIN_EDITOR_COMMAND_ID,
574
+ title: ( localizeWithPath('vs/workbench/browser/parts/editor/editor.contribution', 'unpin', "Unpin")),
575
+ icon: Codicon.pinned
576
+ }, ( ContextKeyExpr.and(( EditorTabsVisibleContext.toNegated()), ( ActiveEditorDirtyContext.toNegated()), ActiveEditorStickyContext)), CLOSE_ORDER, {
577
+ id: CLOSE_EDITOR_COMMAND_ID,
578
+ title: ( localizeWithPath('vs/workbench/browser/parts/editor/editor.contribution', 'close', "Close")),
579
+ icon: Codicon.close
580
+ });
581
+ appendEditorToolItem({
582
+ id: UNPIN_EDITOR_COMMAND_ID,
583
+ title: ( localizeWithPath('vs/workbench/browser/parts/editor/editor.contribution', 'unpin', "Unpin")),
584
+ icon: Codicon.pinnedDirty
585
+ }, ( ContextKeyExpr.and(( EditorTabsVisibleContext.toNegated()), ActiveEditorDirtyContext, ActiveEditorStickyContext)), CLOSE_ORDER, {
586
+ id: CLOSE_EDITOR_COMMAND_ID,
587
+ title: ( localizeWithPath('vs/workbench/browser/parts/editor/editor.contribution', 'close', "Close")),
588
+ icon: Codicon.close
589
+ });
590
+ appendEditorToolItem({
591
+ id: LOCK_GROUP_COMMAND_ID,
592
+ title: ( localizeWithPath(
593
+ 'vs/workbench/browser/parts/editor/editor.contribution',
594
+ 'lockEditorGroup',
595
+ "Lock Group"
596
+ )),
597
+ icon: Codicon.unlock
598
+ }, ( ContextKeyExpr.and(IsAuxiliaryEditorPartContext, ( ActiveEditorGroupLockedContext.toNegated()))), CLOSE_ORDER - 1);
599
+ appendEditorToolItem({
600
+ id: UNLOCK_GROUP_COMMAND_ID,
601
+ title: ( localizeWithPath(
602
+ 'vs/workbench/browser/parts/editor/editor.contribution',
603
+ 'unlockEditorGroup',
604
+ "Unlock Group"
605
+ )),
606
+ icon: Codicon.lock,
607
+ toggled: ContextKeyExpr.true()
608
+ }, ActiveEditorGroupLockedContext, CLOSE_ORDER - 1);
609
+ const previousChangeIcon = registerIcon('diff-editor-previous-change', Codicon.arrowUp, ( localizeWithPath(
610
+ 'vs/workbench/browser/parts/editor/editor.contribution',
611
+ 'previousChangeIcon',
612
+ 'Icon for the previous change action in the diff editor.'
613
+ )));
614
+ const nextChangeIcon = registerIcon('diff-editor-next-change', Codicon.arrowDown, ( localizeWithPath(
615
+ 'vs/workbench/browser/parts/editor/editor.contribution',
616
+ 'nextChangeIcon',
617
+ 'Icon for the next change action in the diff editor.'
618
+ )));
619
+ const toggleWhitespace = registerIcon('diff-editor-toggle-whitespace', Codicon.whitespace, ( localizeWithPath(
620
+ 'vs/workbench/browser/parts/editor/editor.contribution',
621
+ 'toggleWhitespace',
622
+ 'Icon for the toggle whitespace action in the diff editor.'
623
+ )));
624
+ appendEditorToolItem({
625
+ id: GOTO_PREVIOUS_CHANGE,
626
+ title: ( localizeWithPath(
627
+ 'vs/workbench/browser/parts/editor/editor.contribution',
628
+ 'navigate.prev.label',
629
+ "Previous Change"
630
+ )),
631
+ icon: previousChangeIcon
632
+ }, TextCompareEditorActiveContext, 10, undefined, EditorContextKeys.hasChanges);
633
+ appendEditorToolItem({
634
+ id: GOTO_NEXT_CHANGE,
635
+ title: ( localizeWithPath(
636
+ 'vs/workbench/browser/parts/editor/editor.contribution',
637
+ 'navigate.next.label',
638
+ "Next Change"
639
+ )),
640
+ icon: nextChangeIcon
641
+ }, TextCompareEditorActiveContext, 11, undefined, EditorContextKeys.hasChanges);
642
+ MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
643
+ command: {
644
+ id: TOGGLE_DIFF_IGNORE_TRIM_WHITESPACE,
645
+ title: ( localizeWithPath(
646
+ 'vs/workbench/browser/parts/editor/editor.contribution',
647
+ 'ignoreTrimWhitespace.label',
648
+ "Show Leading/Trailing Whitespace Differences"
649
+ )),
650
+ icon: toggleWhitespace,
651
+ precondition: TextCompareEditorActiveContext,
652
+ toggled: ( ContextKeyExpr.equals('config.diffEditor.ignoreTrimWhitespace', false)),
653
+ },
654
+ group: 'navigation',
655
+ when: TextCompareEditorActiveContext,
656
+ order: 20,
657
+ });
658
+ MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: KEEP_EDITOR_COMMAND_ID, title: { value: ( localizeWithPath(
659
+ 'vs/workbench/browser/parts/editor/editor.contribution',
660
+ 'keepEditor',
661
+ "Keep Editor"
662
+ )), original: 'Keep Editor' }, category: Categories.View }, when: ( ContextKeyExpr.has('config.workbench.editor.enablePreview')) });
663
+ MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: PIN_EDITOR_COMMAND_ID, title: { value: ( localizeWithPath(
664
+ 'vs/workbench/browser/parts/editor/editor.contribution',
665
+ 'pinEditor',
666
+ "Pin Editor"
667
+ )), original: 'Pin Editor' }, category: Categories.View } });
668
+ MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: UNPIN_EDITOR_COMMAND_ID, title: { value: ( localizeWithPath(
669
+ 'vs/workbench/browser/parts/editor/editor.contribution',
670
+ 'unpinEditor',
671
+ "Unpin Editor"
672
+ )), original: 'Unpin Editor' }, category: Categories.View } });
673
+ MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: CLOSE_EDITOR_COMMAND_ID, title: { value: ( localizeWithPath(
674
+ 'vs/workbench/browser/parts/editor/editor.contribution',
675
+ 'closeEditor',
676
+ "Close Editor"
677
+ )), original: 'Close Editor' }, category: Categories.View } });
678
+ MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: CLOSE_PINNED_EDITOR_COMMAND_ID, title: { value: ( localizeWithPath(
679
+ 'vs/workbench/browser/parts/editor/editor.contribution',
680
+ 'closePinnedEditor',
681
+ "Close Pinned Editor"
682
+ )), original: 'Close Pinned Editor' }, category: Categories.View } });
683
+ MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: CLOSE_EDITORS_IN_GROUP_COMMAND_ID, title: { value: ( localizeWithPath(
684
+ 'vs/workbench/browser/parts/editor/editor.contribution',
685
+ 'closeEditorsInGroup',
686
+ "Close All Editors in Group"
687
+ )), original: 'Close All Editors in Group' }, category: Categories.View } });
688
+ MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: CLOSE_SAVED_EDITORS_COMMAND_ID, title: { value: ( localizeWithPath(
689
+ 'vs/workbench/browser/parts/editor/editor.contribution',
690
+ 'closeSavedEditors',
691
+ "Close Saved Editors in Group"
692
+ )), original: 'Close Saved Editors in Group' }, category: Categories.View } });
693
+ MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID, title: { value: ( localizeWithPath(
694
+ 'vs/workbench/browser/parts/editor/editor.contribution',
695
+ 'closeOtherEditors',
696
+ "Close Other Editors in Group"
697
+ )), original: 'Close Other Editors in Group' }, category: Categories.View } });
698
+ MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID, title: { value: ( localizeWithPath(
699
+ 'vs/workbench/browser/parts/editor/editor.contribution',
700
+ 'closeRightEditors',
701
+ "Close Editors to the Right in Group"
702
+ )), original: 'Close Editors to the Right in Group' }, category: Categories.View }, when: ( ActiveEditorLastInGroupContext.toNegated()) });
703
+ MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: CLOSE_EDITORS_AND_GROUP_COMMAND_ID, title: { value: ( localizeWithPath(
704
+ 'vs/workbench/browser/parts/editor/editor.contribution',
705
+ 'closeEditorGroup',
706
+ "Close Editor Group"
707
+ )), original: 'Close Editor Group' }, category: Categories.View }, when: MultipleEditorGroupsContext });
708
+ MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: REOPEN_WITH_COMMAND_ID, title: { value: ( localizeWithPath(
709
+ 'vs/workbench/browser/parts/editor/editor.contribution',
710
+ 'reopenWith',
711
+ "Reopen Editor With..."
712
+ )), original: 'Reopen Editor With...' }, category: Categories.View }, when: ActiveEditorAvailableEditorIdsContext });
713
+ MenuRegistry.appendMenuItem(MenuId.MenubarRecentMenu, {
714
+ group: '1_editor',
715
+ command: {
716
+ id: ReopenClosedEditorAction.ID,
717
+ title: ( localizeWithPath(
718
+ 'vs/workbench/browser/parts/editor/editor.contribution',
719
+ { key: 'miReopenClosedEditor', comment: ['&& denotes a mnemonic'] },
720
+ "&&Reopen Closed Editor"
721
+ )),
722
+ precondition: ( ContextKeyExpr.has('canReopenClosedEditor'))
723
+ },
724
+ order: 1
725
+ });
726
+ MenuRegistry.appendMenuItem(MenuId.MenubarRecentMenu, {
727
+ group: 'z_clear',
728
+ command: {
729
+ id: ClearRecentFilesAction.ID,
730
+ title: ( localizeWithPath(
731
+ 'vs/workbench/browser/parts/editor/editor.contribution',
732
+ { key: 'miClearRecentOpen', comment: ['&& denotes a mnemonic'] },
733
+ "&&Clear Recently Opened..."
734
+ ))
735
+ },
736
+ order: 1
737
+ });
738
+ MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
739
+ title: ( localizeWithPath(
740
+ 'vs/workbench/browser/parts/editor/editor.contribution',
741
+ 'miShare',
742
+ "Share"
743
+ )),
744
+ submenu: MenuId.MenubarShare,
745
+ group: '45_share',
746
+ order: 1,
747
+ });
748
+ MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, {
749
+ group: '2_appearance',
750
+ title: ( localizeWithPath(
751
+ 'vs/workbench/browser/parts/editor/editor.contribution',
752
+ { key: 'miEditorLayout', comment: ['&& denotes a mnemonic'] },
753
+ "Editor &&Layout"
754
+ )),
755
+ submenu: MenuId.MenubarLayoutMenu,
756
+ order: 2
757
+ });
758
+ MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
759
+ group: '1_split',
760
+ command: {
761
+ id: SPLIT_EDITOR_UP,
762
+ title: {
763
+ original: 'Split Up',
764
+ value: ( localizeWithPath(
765
+ 'vs/workbench/browser/parts/editor/editor.contribution',
766
+ 'miSplitEditorUpWithoutMnemonic',
767
+ "Split Up"
768
+ )),
769
+ mnemonicTitle: ( localizeWithPath(
770
+ 'vs/workbench/browser/parts/editor/editor.contribution',
771
+ { key: 'miSplitEditorUp', comment: ['&& denotes a mnemonic'] },
772
+ "Split &&Up"
773
+ )),
774
+ }
775
+ },
776
+ order: 1
777
+ });
778
+ MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
779
+ group: '1_split',
780
+ command: {
781
+ id: SPLIT_EDITOR_DOWN,
782
+ title: {
783
+ original: 'Split Down',
784
+ value: ( localizeWithPath(
785
+ 'vs/workbench/browser/parts/editor/editor.contribution',
786
+ 'miSplitEditorDownWithoutMnemonic',
787
+ "Split Down"
788
+ )),
789
+ mnemonicTitle: ( localizeWithPath(
790
+ 'vs/workbench/browser/parts/editor/editor.contribution',
791
+ { key: 'miSplitEditorDown', comment: ['&& denotes a mnemonic'] },
792
+ "Split &&Down"
793
+ ))
794
+ }
795
+ },
796
+ order: 2
797
+ });
798
+ MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
799
+ group: '1_split',
800
+ command: {
801
+ id: SPLIT_EDITOR_LEFT,
802
+ title: {
803
+ original: 'Split Left',
804
+ value: ( localizeWithPath(
805
+ 'vs/workbench/browser/parts/editor/editor.contribution',
806
+ 'miSplitEditorLeftWithoutMnemonic',
807
+ "Split Left"
808
+ )),
809
+ mnemonicTitle: ( localizeWithPath(
810
+ 'vs/workbench/browser/parts/editor/editor.contribution',
811
+ { key: 'miSplitEditorLeft', comment: ['&& denotes a mnemonic'] },
812
+ "Split &&Left"
813
+ ))
814
+ }
815
+ },
816
+ order: 3
817
+ });
818
+ MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
819
+ group: '1_split',
820
+ command: {
821
+ id: SPLIT_EDITOR_RIGHT,
822
+ title: {
823
+ original: 'Split Right',
824
+ value: ( localizeWithPath(
825
+ 'vs/workbench/browser/parts/editor/editor.contribution',
826
+ 'miSplitEditorRightWithoutMnemonic',
827
+ "Split Right"
828
+ )),
829
+ mnemonicTitle: ( localizeWithPath(
830
+ 'vs/workbench/browser/parts/editor/editor.contribution',
831
+ { key: 'miSplitEditorRight', comment: ['&& denotes a mnemonic'] },
832
+ "Split &&Right"
833
+ ))
834
+ }
835
+ },
836
+ order: 4
837
+ });
838
+ MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
839
+ group: '2_split_in_group',
840
+ command: {
841
+ id: SPLIT_EDITOR_IN_GROUP,
842
+ title: {
843
+ original: 'Split in Group',
844
+ value: ( localizeWithPath(
845
+ 'vs/workbench/browser/parts/editor/editor.contribution',
846
+ 'miSplitEditorInGroupWithoutMnemonic',
847
+ "Split in Group"
848
+ )),
849
+ mnemonicTitle: ( localizeWithPath(
850
+ 'vs/workbench/browser/parts/editor/editor.contribution',
851
+ { key: 'miSplitEditorInGroup', comment: ['&& denotes a mnemonic'] },
852
+ "Split in &&Group"
853
+ ))
854
+ }
855
+ },
856
+ when: ActiveEditorCanSplitInGroupContext,
857
+ order: 1
858
+ });
859
+ MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
860
+ group: '2_split_in_group',
861
+ command: {
862
+ id: JOIN_EDITOR_IN_GROUP,
863
+ title: {
864
+ original: 'Join in Group',
865
+ value: ( localizeWithPath(
866
+ 'vs/workbench/browser/parts/editor/editor.contribution',
867
+ 'miJoinEditorInGroupWithoutMnemonic',
868
+ "Join in Group"
869
+ )),
870
+ mnemonicTitle: ( localizeWithPath(
871
+ 'vs/workbench/browser/parts/editor/editor.contribution',
872
+ { key: 'miJoinEditorInGroup', comment: ['&& denotes a mnemonic'] },
873
+ "Join in &&Group"
874
+ ))
875
+ }
876
+ },
877
+ when: SideBySideEditorActiveContext,
878
+ order: 1
879
+ });
880
+ MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
881
+ group: '3_new_window',
882
+ command: {
883
+ id: MOVE_EDITOR_INTO_NEW_WINDOW_COMMAND_ID,
884
+ title: {
885
+ original: 'Move Editor into New Window',
886
+ value: ( localizeWithPath(
887
+ 'vs/workbench/browser/parts/editor/editor.contribution',
888
+ 'moveEditorToNewWindow',
889
+ "Move Editor into New Window"
890
+ )),
891
+ mnemonicTitle: ( localizeWithPath(
892
+ 'vs/workbench/browser/parts/editor/editor.contribution',
893
+ { key: 'miMoveEditorToNewWindow', comment: ['&& denotes a mnemonic'] },
894
+ "&&Move Editor into New Window"
895
+ ))
896
+ }
897
+ },
898
+ order: 1
899
+ });
900
+ MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
901
+ group: '3_new_window',
902
+ command: {
903
+ id: COPY_EDITOR_INTO_NEW_WINDOW_COMMAND_ID,
904
+ title: {
905
+ original: 'Copy Editor into New Window',
906
+ value: ( localizeWithPath(
907
+ 'vs/workbench/browser/parts/editor/editor.contribution',
908
+ 'copyEditorToNewWindow',
909
+ "Copy Editor into New Window"
910
+ )),
911
+ mnemonicTitle: ( localizeWithPath(
912
+ 'vs/workbench/browser/parts/editor/editor.contribution',
913
+ { key: 'miCopyEditorToNewWindow', comment: ['&& denotes a mnemonic'] },
914
+ "&&Copy Editor into New Window"
915
+ ))
916
+ }
917
+ },
918
+ order: 2
919
+ });
920
+ MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
921
+ group: '4_layouts',
922
+ command: {
923
+ id: EditorLayoutSingleAction.ID,
924
+ title: {
925
+ original: 'Single',
926
+ value: ( localizeWithPath(
927
+ 'vs/workbench/browser/parts/editor/editor.contribution',
928
+ 'miSingleColumnEditorLayoutWithoutMnemonic',
929
+ "Single"
930
+ )),
931
+ mnemonicTitle: ( localizeWithPath(
932
+ 'vs/workbench/browser/parts/editor/editor.contribution',
933
+ { key: 'miSingleColumnEditorLayout', comment: ['&& denotes a mnemonic'] },
934
+ "&&Single"
935
+ ))
936
+ }
937
+ },
938
+ order: 1
939
+ });
940
+ MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
941
+ group: '4_layouts',
942
+ command: {
943
+ id: EditorLayoutTwoColumnsAction.ID,
944
+ title: {
945
+ original: 'Two Columns',
946
+ value: ( localizeWithPath(
947
+ 'vs/workbench/browser/parts/editor/editor.contribution',
948
+ 'miTwoColumnsEditorLayoutWithoutMnemonic',
949
+ "Two Columns"
950
+ )),
951
+ mnemonicTitle: ( localizeWithPath(
952
+ 'vs/workbench/browser/parts/editor/editor.contribution',
953
+ { key: 'miTwoColumnsEditorLayout', comment: ['&& denotes a mnemonic'] },
954
+ "&&Two Columns"
955
+ ))
956
+ }
957
+ },
958
+ order: 3
959
+ });
960
+ MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
961
+ group: '4_layouts',
962
+ command: {
963
+ id: EditorLayoutThreeColumnsAction.ID,
964
+ title: {
965
+ original: 'Three Columns',
966
+ value: ( localizeWithPath(
967
+ 'vs/workbench/browser/parts/editor/editor.contribution',
968
+ 'miThreeColumnsEditorLayoutWithoutMnemonic',
969
+ "Three Columns"
970
+ )),
971
+ mnemonicTitle: ( localizeWithPath(
972
+ 'vs/workbench/browser/parts/editor/editor.contribution',
973
+ { key: 'miThreeColumnsEditorLayout', comment: ['&& denotes a mnemonic'] },
974
+ "T&&hree Columns"
975
+ ))
976
+ }
977
+ },
978
+ order: 4
979
+ });
980
+ MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
981
+ group: '4_layouts',
982
+ command: {
983
+ id: EditorLayoutTwoRowsAction.ID,
984
+ title: {
985
+ original: 'Two Rows',
986
+ value: ( localizeWithPath(
987
+ 'vs/workbench/browser/parts/editor/editor.contribution',
988
+ 'miTwoRowsEditorLayoutWithoutMnemonic',
989
+ "Two Rows"
990
+ )),
991
+ mnemonicTitle: ( localizeWithPath(
992
+ 'vs/workbench/browser/parts/editor/editor.contribution',
993
+ { key: 'miTwoRowsEditorLayout', comment: ['&& denotes a mnemonic'] },
994
+ "T&&wo Rows"
995
+ ))
996
+ }
997
+ },
998
+ order: 5
999
+ });
1000
+ MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
1001
+ group: '4_layouts',
1002
+ command: {
1003
+ id: EditorLayoutThreeRowsAction.ID,
1004
+ title: {
1005
+ original: 'Three Rows',
1006
+ value: ( localizeWithPath(
1007
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1008
+ 'miThreeRowsEditorLayoutWithoutMnemonic',
1009
+ "Three Rows"
1010
+ )),
1011
+ mnemonicTitle: ( localizeWithPath(
1012
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1013
+ { key: 'miThreeRowsEditorLayout', comment: ['&& denotes a mnemonic'] },
1014
+ "Three &&Rows"
1015
+ ))
1016
+ }
1017
+ },
1018
+ order: 6
1019
+ });
1020
+ MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
1021
+ group: '4_layouts',
1022
+ command: {
1023
+ id: EditorLayoutTwoByTwoGridAction.ID,
1024
+ title: {
1025
+ original: 'Grid (2x2)',
1026
+ value: ( localizeWithPath(
1027
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1028
+ 'miTwoByTwoGridEditorLayoutWithoutMnemonic',
1029
+ "Grid (2x2)"
1030
+ )),
1031
+ mnemonicTitle: ( localizeWithPath(
1032
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1033
+ { key: 'miTwoByTwoGridEditorLayout', comment: ['&& denotes a mnemonic'] },
1034
+ "&&Grid (2x2)"
1035
+ ))
1036
+ }
1037
+ },
1038
+ order: 7
1039
+ });
1040
+ MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
1041
+ group: '4_layouts',
1042
+ command: {
1043
+ id: EditorLayoutTwoRowsRightAction.ID,
1044
+ title: {
1045
+ original: 'Two Rows Right',
1046
+ value: ( localizeWithPath(
1047
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1048
+ 'miTwoRowsRightEditorLayoutWithoutMnemonic',
1049
+ "Two Rows Right"
1050
+ )),
1051
+ mnemonicTitle: ( localizeWithPath(
1052
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1053
+ { key: 'miTwoRowsRightEditorLayout', comment: ['&& denotes a mnemonic'] },
1054
+ "Two R&&ows Right"
1055
+ ))
1056
+ }
1057
+ },
1058
+ order: 8
1059
+ });
1060
+ MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
1061
+ group: '4_layouts',
1062
+ command: {
1063
+ id: EditorLayoutTwoColumnsBottomAction.ID,
1064
+ title: {
1065
+ original: 'Two Columns Bottom',
1066
+ value: ( localizeWithPath(
1067
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1068
+ 'miTwoColumnsBottomEditorLayoutWithoutMnemonic',
1069
+ "Two Columns Bottom"
1070
+ )),
1071
+ mnemonicTitle: ( localizeWithPath(
1072
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1073
+ { key: 'miTwoColumnsBottomEditorLayout', comment: ['&& denotes a mnemonic'] },
1074
+ "Two &&Columns Bottom"
1075
+ ))
1076
+ }
1077
+ },
1078
+ order: 9
1079
+ });
1080
+ MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
1081
+ group: '1_history_nav',
1082
+ command: {
1083
+ id: 'workbench.action.navigateToLastEditLocation',
1084
+ title: ( localizeWithPath(
1085
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1086
+ { key: 'miLastEditLocation', comment: ['&& denotes a mnemonic'] },
1087
+ "&&Last Edit Location"
1088
+ )),
1089
+ precondition: ( ContextKeyExpr.has('canNavigateToLastEditLocation'))
1090
+ },
1091
+ order: 3
1092
+ });
1093
+ MenuRegistry.appendMenuItem(MenuId.MenubarSwitchEditorMenu, {
1094
+ group: '1_sideBySide',
1095
+ command: {
1096
+ id: FOCUS_FIRST_SIDE_EDITOR,
1097
+ title: ( localizeWithPath(
1098
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1099
+ { key: 'miFirstSideEditor', comment: ['&& denotes a mnemonic'] },
1100
+ "&&First Side in Editor"
1101
+ ))
1102
+ },
1103
+ when: ( ContextKeyExpr.or(SideBySideEditorActiveContext, TextCompareEditorActiveContext)),
1104
+ order: 1
1105
+ });
1106
+ MenuRegistry.appendMenuItem(MenuId.MenubarSwitchEditorMenu, {
1107
+ group: '1_sideBySide',
1108
+ command: {
1109
+ id: FOCUS_SECOND_SIDE_EDITOR,
1110
+ title: ( localizeWithPath(
1111
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1112
+ { key: 'miSecondSideEditor', comment: ['&& denotes a mnemonic'] },
1113
+ "&&Second Side in Editor"
1114
+ ))
1115
+ },
1116
+ when: ( ContextKeyExpr.or(SideBySideEditorActiveContext, TextCompareEditorActiveContext)),
1117
+ order: 2
1118
+ });
1119
+ MenuRegistry.appendMenuItem(MenuId.MenubarSwitchEditorMenu, {
1120
+ group: '2_any',
1121
+ command: {
1122
+ id: 'workbench.action.nextEditor',
1123
+ title: ( localizeWithPath(
1124
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1125
+ { key: 'miNextEditor', comment: ['&& denotes a mnemonic'] },
1126
+ "&&Next Editor"
1127
+ ))
1128
+ },
1129
+ order: 1
1130
+ });
1131
+ MenuRegistry.appendMenuItem(MenuId.MenubarSwitchEditorMenu, {
1132
+ group: '2_any',
1133
+ command: {
1134
+ id: 'workbench.action.previousEditor',
1135
+ title: ( localizeWithPath(
1136
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1137
+ { key: 'miPreviousEditor', comment: ['&& denotes a mnemonic'] },
1138
+ "&&Previous Editor"
1139
+ ))
1140
+ },
1141
+ order: 2
1142
+ });
1143
+ MenuRegistry.appendMenuItem(MenuId.MenubarSwitchEditorMenu, {
1144
+ group: '3_any_used',
1145
+ command: {
1146
+ id: 'workbench.action.openNextRecentlyUsedEditor',
1147
+ title: ( localizeWithPath(
1148
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1149
+ { key: 'miNextRecentlyUsedEditor', comment: ['&& denotes a mnemonic'] },
1150
+ "&&Next Used Editor"
1151
+ ))
1152
+ },
1153
+ order: 1
1154
+ });
1155
+ MenuRegistry.appendMenuItem(MenuId.MenubarSwitchEditorMenu, {
1156
+ group: '3_any_used',
1157
+ command: {
1158
+ id: 'workbench.action.openPreviousRecentlyUsedEditor',
1159
+ title: ( localizeWithPath(
1160
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1161
+ { key: 'miPreviousRecentlyUsedEditor', comment: ['&& denotes a mnemonic'] },
1162
+ "&&Previous Used Editor"
1163
+ ))
1164
+ },
1165
+ order: 2
1166
+ });
1167
+ MenuRegistry.appendMenuItem(MenuId.MenubarSwitchEditorMenu, {
1168
+ group: '4_group',
1169
+ command: {
1170
+ id: 'workbench.action.nextEditorInGroup',
1171
+ title: ( localizeWithPath(
1172
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1173
+ { key: 'miNextEditorInGroup', comment: ['&& denotes a mnemonic'] },
1174
+ "&&Next Editor in Group"
1175
+ ))
1176
+ },
1177
+ order: 1
1178
+ });
1179
+ MenuRegistry.appendMenuItem(MenuId.MenubarSwitchEditorMenu, {
1180
+ group: '4_group',
1181
+ command: {
1182
+ id: 'workbench.action.previousEditorInGroup',
1183
+ title: ( localizeWithPath(
1184
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1185
+ { key: 'miPreviousEditorInGroup', comment: ['&& denotes a mnemonic'] },
1186
+ "&&Previous Editor in Group"
1187
+ ))
1188
+ },
1189
+ order: 2
1190
+ });
1191
+ MenuRegistry.appendMenuItem(MenuId.MenubarSwitchEditorMenu, {
1192
+ group: '5_group_used',
1193
+ command: {
1194
+ id: 'workbench.action.openNextRecentlyUsedEditorInGroup',
1195
+ title: ( localizeWithPath(
1196
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1197
+ { key: 'miNextUsedEditorInGroup', comment: ['&& denotes a mnemonic'] },
1198
+ "&&Next Used Editor in Group"
1199
+ ))
1200
+ },
1201
+ order: 1
1202
+ });
1203
+ MenuRegistry.appendMenuItem(MenuId.MenubarSwitchEditorMenu, {
1204
+ group: '5_group_used',
1205
+ command: {
1206
+ id: 'workbench.action.openPreviousRecentlyUsedEditorInGroup',
1207
+ title: ( localizeWithPath(
1208
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1209
+ { key: 'miPreviousUsedEditorInGroup', comment: ['&& denotes a mnemonic'] },
1210
+ "&&Previous Used Editor in Group"
1211
+ ))
1212
+ },
1213
+ order: 2
1214
+ });
1215
+ MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
1216
+ group: '2_editor_nav',
1217
+ title: ( localizeWithPath(
1218
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1219
+ { key: 'miSwitchEditor', comment: ['&& denotes a mnemonic'] },
1220
+ "Switch &&Editor"
1221
+ )),
1222
+ submenu: MenuId.MenubarSwitchEditorMenu,
1223
+ order: 1
1224
+ });
1225
+ MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
1226
+ group: '1_focus_index',
1227
+ command: {
1228
+ id: 'workbench.action.focusFirstEditorGroup',
1229
+ title: ( localizeWithPath(
1230
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1231
+ { key: 'miFocusFirstGroup', comment: ['&& denotes a mnemonic'] },
1232
+ "Group &&1"
1233
+ ))
1234
+ },
1235
+ order: 1
1236
+ });
1237
+ MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
1238
+ group: '1_focus_index',
1239
+ command: {
1240
+ id: 'workbench.action.focusSecondEditorGroup',
1241
+ title: ( localizeWithPath(
1242
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1243
+ { key: 'miFocusSecondGroup', comment: ['&& denotes a mnemonic'] },
1244
+ "Group &&2"
1245
+ ))
1246
+ },
1247
+ order: 2
1248
+ });
1249
+ MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
1250
+ group: '1_focus_index',
1251
+ command: {
1252
+ id: 'workbench.action.focusThirdEditorGroup',
1253
+ title: ( localizeWithPath(
1254
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1255
+ { key: 'miFocusThirdGroup', comment: ['&& denotes a mnemonic'] },
1256
+ "Group &&3"
1257
+ )),
1258
+ precondition: MultipleEditorGroupsContext
1259
+ },
1260
+ order: 3
1261
+ });
1262
+ MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
1263
+ group: '1_focus_index',
1264
+ command: {
1265
+ id: 'workbench.action.focusFourthEditorGroup',
1266
+ title: ( localizeWithPath(
1267
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1268
+ { key: 'miFocusFourthGroup', comment: ['&& denotes a mnemonic'] },
1269
+ "Group &&4"
1270
+ )),
1271
+ precondition: MultipleEditorGroupsContext
1272
+ },
1273
+ order: 4
1274
+ });
1275
+ MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
1276
+ group: '1_focus_index',
1277
+ command: {
1278
+ id: 'workbench.action.focusFifthEditorGroup',
1279
+ title: ( localizeWithPath(
1280
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1281
+ { key: 'miFocusFifthGroup', comment: ['&& denotes a mnemonic'] },
1282
+ "Group &&5"
1283
+ )),
1284
+ precondition: MultipleEditorGroupsContext
1285
+ },
1286
+ order: 5
1287
+ });
1288
+ MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
1289
+ group: '2_next_prev',
1290
+ command: {
1291
+ id: 'workbench.action.focusNextGroup',
1292
+ title: ( localizeWithPath(
1293
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1294
+ { key: 'miNextGroup', comment: ['&& denotes a mnemonic'] },
1295
+ "&&Next Group"
1296
+ )),
1297
+ precondition: MultipleEditorGroupsContext
1298
+ },
1299
+ order: 1
1300
+ });
1301
+ MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
1302
+ group: '2_next_prev',
1303
+ command: {
1304
+ id: 'workbench.action.focusPreviousGroup',
1305
+ title: ( localizeWithPath(
1306
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1307
+ { key: 'miPreviousGroup', comment: ['&& denotes a mnemonic'] },
1308
+ "&&Previous Group"
1309
+ )),
1310
+ precondition: MultipleEditorGroupsContext
1311
+ },
1312
+ order: 2
1313
+ });
1314
+ MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
1315
+ group: '3_directional',
1316
+ command: {
1317
+ id: 'workbench.action.focusLeftGroup',
1318
+ title: ( localizeWithPath(
1319
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1320
+ { key: 'miFocusLeftGroup', comment: ['&& denotes a mnemonic'] },
1321
+ "Group &&Left"
1322
+ )),
1323
+ precondition: MultipleEditorGroupsContext
1324
+ },
1325
+ order: 1
1326
+ });
1327
+ MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
1328
+ group: '3_directional',
1329
+ command: {
1330
+ id: 'workbench.action.focusRightGroup',
1331
+ title: ( localizeWithPath(
1332
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1333
+ { key: 'miFocusRightGroup', comment: ['&& denotes a mnemonic'] },
1334
+ "Group &&Right"
1335
+ )),
1336
+ precondition: MultipleEditorGroupsContext
1337
+ },
1338
+ order: 2
1339
+ });
1340
+ MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
1341
+ group: '3_directional',
1342
+ command: {
1343
+ id: 'workbench.action.focusAboveGroup',
1344
+ title: ( localizeWithPath(
1345
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1346
+ { key: 'miFocusAboveGroup', comment: ['&& denotes a mnemonic'] },
1347
+ "Group &&Above"
1348
+ )),
1349
+ precondition: MultipleEditorGroupsContext
1350
+ },
1351
+ order: 3
1352
+ });
1353
+ MenuRegistry.appendMenuItem(MenuId.MenubarSwitchGroupMenu, {
1354
+ group: '3_directional',
1355
+ command: {
1356
+ id: 'workbench.action.focusBelowGroup',
1357
+ title: ( localizeWithPath(
1358
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1359
+ { key: 'miFocusBelowGroup', comment: ['&& denotes a mnemonic'] },
1360
+ "Group &&Below"
1361
+ )),
1362
+ precondition: MultipleEditorGroupsContext
1363
+ },
1364
+ order: 4
1365
+ });
1366
+ MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
1367
+ group: '2_editor_nav',
1368
+ title: ( localizeWithPath(
1369
+ 'vs/workbench/browser/parts/editor/editor.contribution',
1370
+ { key: 'miSwitchGroup', comment: ['&& denotes a mnemonic'] },
1371
+ "Switch &&Group"
1372
+ )),
1373
+ submenu: MenuId.MenubarSwitchGroupMenu,
1374
+ order: 2
1375
+ });