Skip to content

Commit c149df2

Browse files
authored
Use registerAction2 instead of registerWorkbenchAction (microsoft#162713) (microsoft#175622)
1 parent 5c065dc commit c149df2

File tree

3 files changed

+354
-324
lines changed

3 files changed

+354
-324
lines changed

src/vs/workbench/browser/parts/editor/editor.contribution.ts

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -195,33 +195,36 @@ registerAction2(ShowAllEditorsByAppearanceAction);
195195
registerAction2(ShowAllEditorsByMostRecentlyUsedAction);
196196
registerAction2(ShowEditorsInActiveGroupByMostRecentlyUsedAction);
197197

198+
registerAction2(CloseAllEditorsAction);
199+
registerAction2(CloseAllEditorGroupsAction);
200+
registerAction2(CloseLeftEditorsInGroupAction);
201+
registerAction2(CloseEditorsInOtherGroupsAction);
202+
registerAction2(CloseEditorInAllGroupsAction);
203+
registerAction2(RevertAndCloseEditorAction);
204+
205+
registerAction2(SplitEditorAction);
206+
registerAction2(SplitEditorOrthogonalAction);
207+
208+
registerAction2(SplitEditorLeftAction);
209+
registerAction2(SplitEditorRightAction);
210+
registerAction2(SplitEditorUpAction);
211+
registerAction2(SplitEditorDownAction);
212+
213+
registerAction2(JoinTwoGroupsAction);
214+
registerAction2(JoinAllGroupsAction);
215+
216+
registerAction2(NavigateBetweenGroupsAction);
217+
218+
registerAction2(ResetGroupSizesAction);
219+
registerAction2(ToggleGroupSizesAction);
220+
registerAction2(MaximizeGroupAction);
221+
registerAction2(MinimizeOtherGroupsAction);
222+
223+
registerAction2(MoveEditorLeftInGroupAction);
224+
registerAction2(MoveEditorRightInGroupAction);
225+
198226
// Editor Management (deprecated old style)
199227
const registry = Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions);
200-
registry.registerWorkbenchAction(SyncActionDescriptor.from(CloseAllEditorsAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyW) }), 'View: Close All Editors', Categories.View.value);
201-
registry.registerWorkbenchAction(SyncActionDescriptor.from(CloseAllEditorGroupsAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyW) }), 'View: Close All Editor Groups', Categories.View.value);
202-
registry.registerWorkbenchAction(SyncActionDescriptor.from(CloseLeftEditorsInGroupAction), 'View: Close Editors to the Left in Group', Categories.View.value);
203-
registry.registerWorkbenchAction(SyncActionDescriptor.from(CloseEditorsInOtherGroupsAction), 'View: Close Editors in Other Groups', Categories.View.value);
204-
registry.registerWorkbenchAction(SyncActionDescriptor.from(CloseEditorInAllGroupsAction), 'View: Close Editor in All Groups', Categories.View.value);
205-
registry.registerWorkbenchAction(SyncActionDescriptor.from(RevertAndCloseEditorAction), 'View: Revert and Close Editor', Categories.View.value);
206-
207-
registry.registerWorkbenchAction(SyncActionDescriptor.from(SplitEditorAction, { primary: KeyMod.CtrlCmd | KeyCode.Backslash }), 'View: Split Editor', Categories.View.value);
208-
registry.registerWorkbenchAction(SyncActionDescriptor.from(SplitEditorOrthogonalAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.Backslash) }), 'View: Split Editor Orthogonal', Categories.View.value);
209-
registry.registerWorkbenchAction(SyncActionDescriptor.from(SplitEditorLeftAction), 'View: Split Editor Left', Categories.View.value);
210-
registry.registerWorkbenchAction(SyncActionDescriptor.from(SplitEditorRightAction), 'View: Split Editor Right', Categories.View.value);
211-
registry.registerWorkbenchAction(SyncActionDescriptor.from(SplitEditorUpAction), 'View: Split Editor Up', Categories.View.value);
212-
registry.registerWorkbenchAction(SyncActionDescriptor.from(SplitEditorDownAction), 'View: Split Editor Down', Categories.View.value);
213-
registry.registerWorkbenchAction(SyncActionDescriptor.from(JoinTwoGroupsAction), 'View: Join Editor Group with Next Group', Categories.View.value);
214-
registry.registerWorkbenchAction(SyncActionDescriptor.from(JoinAllGroupsAction), 'View: Join All Editor Groups', Categories.View.value);
215-
216-
registry.registerWorkbenchAction(SyncActionDescriptor.from(NavigateBetweenGroupsAction), 'View: Navigate Between Editor Groups', Categories.View.value);
217-
218-
registry.registerWorkbenchAction(SyncActionDescriptor.from(ResetGroupSizesAction), 'View: Reset Editor Group Sizes', Categories.View.value);
219-
registry.registerWorkbenchAction(SyncActionDescriptor.from(ToggleGroupSizesAction), 'View: Toggle Editor Group Sizes', Categories.View.value);
220-
registry.registerWorkbenchAction(SyncActionDescriptor.from(MaximizeGroupAction), 'View: Maximize Editor Group and Hide Side Bars', Categories.View.value);
221-
registry.registerWorkbenchAction(SyncActionDescriptor.from(MinimizeOtherGroupsAction), 'View: Maximize Editor Group', Categories.View.value);
222-
223-
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveEditorLeftInGroupAction, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.PageUp, mac: { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.LeftArrow) } }), 'View: Move Editor Left', Categories.View.value);
224-
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveEditorRightInGroupAction, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.PageDown, mac: { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.RightArrow) } }), 'View: Move Editor Right', Categories.View.value);
225228

226229
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveGroupLeftAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.LeftArrow) }), 'View: Move Editor Group Left', Categories.View.value);
227230
registry.registerWorkbenchAction(SyncActionDescriptor.from(MoveGroupRightAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.RightArrow) }), 'View: Move Editor Group Right', Categories.View.value);

0 commit comments

Comments
 (0)