@@ -41,13 +41,13 @@ import {
41
41
ReOpenInTextEditorAction , DuplicateGroupDownAction , DuplicateGroupLeftAction , DuplicateGroupRightAction , DuplicateGroupUpAction , ToggleEditorTypeAction , SplitEditorToAboveGroupAction , SplitEditorToBelowGroupAction ,
42
42
SplitEditorToFirstGroupAction , SplitEditorToLastGroupAction , SplitEditorToLeftGroupAction , SplitEditorToNextGroupAction , SplitEditorToPreviousGroupAction , SplitEditorToRightGroupAction , NavigateForwardInEditsAction ,
43
43
NavigateBackwardsInEditsAction , NavigateForwardInNavigationsAction , NavigateBackwardsInNavigationsAction , NavigatePreviousInNavigationsAction , NavigatePreviousInEditsAction , NavigateToLastNavigationLocationAction ,
44
- MaximizeGroupHideSidebarAction , MoveEditorToNewWindowAction , CopyEditorToNewindowAction , RestoreEditorsToMainWindowAction , ToggleMaximizeEditorGroupAction , MinimizeOtherGroupsHideSidebarAction , CopyEditorGroupToNewWindowAction , MoveEditorGroupToNewWindowAction
44
+ MaximizeGroupHideSidebarAction , MoveEditorToNewWindowAction , CopyEditorToNewindowAction , RestoreEditorsToMainWindowAction , ToggleMaximizeEditorGroupAction , MinimizeOtherGroupsHideSidebarAction , CopyEditorGroupToNewWindowAction , MoveEditorGroupToNewWindowAction , NewEmptyEditorWindowAction
45
45
} from 'vs/workbench/browser/parts/editor/editorActions' ;
46
46
import {
47
47
CLOSE_EDITORS_AND_GROUP_COMMAND_ID , CLOSE_EDITORS_IN_GROUP_COMMAND_ID , CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID , CLOSE_EDITOR_COMMAND_ID , CLOSE_EDITOR_GROUP_COMMAND_ID , CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID ,
48
48
CLOSE_PINNED_EDITOR_COMMAND_ID , CLOSE_SAVED_EDITORS_COMMAND_ID , GOTO_NEXT_CHANGE , GOTO_PREVIOUS_CHANGE , KEEP_EDITOR_COMMAND_ID , PIN_EDITOR_COMMAND_ID , SHOW_EDITORS_IN_GROUP , SPLIT_EDITOR_DOWN , SPLIT_EDITOR_LEFT ,
49
49
SPLIT_EDITOR_RIGHT , SPLIT_EDITOR_UP , TOGGLE_DIFF_IGNORE_TRIM_WHITESPACE , TOGGLE_DIFF_SIDE_BY_SIDE , TOGGLE_KEEP_EDITORS_COMMAND_ID , UNPIN_EDITOR_COMMAND_ID , setup as registerEditorCommands , REOPEN_WITH_COMMAND_ID ,
50
- TOGGLE_LOCK_GROUP_COMMAND_ID , UNLOCK_GROUP_COMMAND_ID , SPLIT_EDITOR_IN_GROUP , JOIN_EDITOR_IN_GROUP , FOCUS_FIRST_SIDE_EDITOR , FOCUS_SECOND_SIDE_EDITOR , TOGGLE_SPLIT_EDITOR_IN_GROUP_LAYOUT , LOCK_GROUP_COMMAND_ID , SPLIT_EDITOR , TOGGLE_MAXIMIZE_EDITOR_GROUP , MOVE_EDITOR_INTO_NEW_WINDOW_COMMAND_ID , COPY_EDITOR_INTO_NEW_WINDOW_COMMAND_ID
50
+ TOGGLE_LOCK_GROUP_COMMAND_ID , UNLOCK_GROUP_COMMAND_ID , SPLIT_EDITOR_IN_GROUP , JOIN_EDITOR_IN_GROUP , FOCUS_FIRST_SIDE_EDITOR , FOCUS_SECOND_SIDE_EDITOR , TOGGLE_SPLIT_EDITOR_IN_GROUP_LAYOUT , LOCK_GROUP_COMMAND_ID , SPLIT_EDITOR , TOGGLE_MAXIMIZE_EDITOR_GROUP , MOVE_EDITOR_INTO_NEW_WINDOW_COMMAND_ID , COPY_EDITOR_INTO_NEW_WINDOW_COMMAND_ID , MOVE_EDITOR_GROUP_INTO_NEW_WINDOW_COMMAND_ID , COPY_EDITOR_GROUP_INTO_NEW_WINDOW_COMMAND_ID , NEW_EMPTY_EDITOR_WINDOW_COMMAND_ID
51
51
} from 'vs/workbench/browser/parts/editor/editorCommands' ;
52
52
import { inQuickPickContext , getQuickNavigateHandler } from 'vs/workbench/browser/quickaccess' ;
53
53
import { KeybindingsRegistry , KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry' ;
@@ -299,6 +299,7 @@ registerAction2(CopyEditorToNewindowAction);
299
299
registerAction2 ( MoveEditorGroupToNewWindowAction ) ;
300
300
registerAction2 ( CopyEditorGroupToNewWindowAction ) ;
301
301
registerAction2 ( RestoreEditorsToMainWindowAction ) ;
302
+ registerAction2 ( NewEmptyEditorWindowAction ) ;
302
303
303
304
const quickAccessNavigateNextInEditorPickerId = 'workbench.action.quickOpenNavigateNextInEditorPicker' ;
304
305
KeybindingsRegistry . registerCommandAndKeybindingRule ( {
@@ -351,21 +352,25 @@ MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: SPL
351
352
MenuRegistry . appendMenuItem ( MenuId . EmptyEditorGroupContext , { command : { id : SPLIT_EDITOR_DOWN , title : localize ( 'splitDown' , "Split Down" ) } , group : '2_split' , order : 20 } ) ;
352
353
MenuRegistry . appendMenuItem ( MenuId . EmptyEditorGroupContext , { command : { id : SPLIT_EDITOR_LEFT , title : localize ( 'splitLeft' , "Split Left" ) } , group : '2_split' , order : 30 } ) ;
353
354
MenuRegistry . appendMenuItem ( MenuId . EmptyEditorGroupContext , { command : { id : SPLIT_EDITOR_RIGHT , title : localize ( 'splitRight' , "Split Right" ) } , group : '2_split' , order : 40 } ) ;
354
- MenuRegistry . appendMenuItem ( MenuId . EmptyEditorGroupContext , { command : { id : TOGGLE_LOCK_GROUP_COMMAND_ID , title : localize ( 'toggleLockGroup' , "Lock Group" ) , toggled : ActiveEditorGroupLockedContext } , group : '3_lock' , order : 10 , when : ContextKeyExpr . and ( MultipleEditorGroupsContext , IsAuxiliaryEditorPartContext . toNegated ( ) ) } ) ;
355
- MenuRegistry . appendMenuItem ( MenuId . EmptyEditorGroupContext , { command : { id : CLOSE_EDITOR_GROUP_COMMAND_ID , title : localize ( 'close' , "Close" ) } , group : '4_close' , order : 10 , when : MultipleEditorGroupsContext } ) ;
355
+ MenuRegistry . appendMenuItem ( MenuId . EmptyEditorGroupContext , { command : { id : NEW_EMPTY_EDITOR_WINDOW_COMMAND_ID , title : localize ( 'newWindow' , "New Window" ) } , group : '3_window' , order : 10 } ) ;
356
+ MenuRegistry . appendMenuItem ( MenuId . EmptyEditorGroupContext , { command : { id : TOGGLE_LOCK_GROUP_COMMAND_ID , title : localize ( 'toggleLockGroup' , "Lock Group" ) , toggled : ActiveEditorGroupLockedContext } , group : '4_lock' , order : 10 , when : ContextKeyExpr . and ( MultipleEditorGroupsContext , IsAuxiliaryEditorPartContext . toNegated ( ) ) } ) ;
357
+ MenuRegistry . appendMenuItem ( MenuId . EmptyEditorGroupContext , { command : { id : CLOSE_EDITOR_GROUP_COMMAND_ID , title : localize ( 'close' , "Close" ) } , group : '5_close' , order : 10 , when : MultipleEditorGroupsContext } ) ;
356
358
357
359
// Editor Tab Container Context Menu
358
360
MenuRegistry . appendMenuItem ( MenuId . EditorTabsBarContext , { command : { id : SPLIT_EDITOR_UP , title : localize ( 'splitUp' , "Split Up" ) } , group : '2_split' , order : 10 } ) ;
359
361
MenuRegistry . appendMenuItem ( MenuId . EditorTabsBarContext , { command : { id : SPLIT_EDITOR_DOWN , title : localize ( 'splitDown' , "Split Down" ) } , group : '2_split' , order : 20 } ) ;
360
362
MenuRegistry . appendMenuItem ( MenuId . EditorTabsBarContext , { command : { id : SPLIT_EDITOR_LEFT , title : localize ( 'splitLeft' , "Split Left" ) } , group : '2_split' , order : 30 } ) ;
361
363
MenuRegistry . appendMenuItem ( MenuId . EditorTabsBarContext , { command : { id : SPLIT_EDITOR_RIGHT , title : localize ( 'splitRight' , "Split Right" ) } , group : '2_split' , order : 40 } ) ;
362
364
363
- MenuRegistry . appendMenuItem ( MenuId . EditorTabsBarContext , { submenu : MenuId . EditorTabsBarShowTabsSubmenu , title : localize ( 'tabBar' , "Tab Bar" ) , group : '3_config' , order : 10 , when : InEditorZenModeContext . negate ( ) } ) ;
365
+ MenuRegistry . appendMenuItem ( MenuId . EditorTabsBarContext , { command : { id : MOVE_EDITOR_GROUP_INTO_NEW_WINDOW_COMMAND_ID , title : localize ( 'moveEditorGroupToNewWindow' , "Move into New Window" ) } , group : '3_window' , order : 10 } ) ;
366
+ MenuRegistry . appendMenuItem ( MenuId . EditorTabsBarContext , { command : { id : COPY_EDITOR_GROUP_INTO_NEW_WINDOW_COMMAND_ID , title : localize ( 'copyEditorGroupToNewWindow' , "Copy into New Window" ) } , group : '3_window' , order : 20 } ) ;
367
+
368
+ MenuRegistry . appendMenuItem ( MenuId . EditorTabsBarContext , { submenu : MenuId . EditorTabsBarShowTabsSubmenu , title : localize ( 'tabBar' , "Tab Bar" ) , group : '4_config' , order : 10 , when : InEditorZenModeContext . negate ( ) } ) ;
364
369
MenuRegistry . appendMenuItem ( MenuId . EditorTabsBarShowTabsSubmenu , { command : { id : ShowMultipleEditorTabsAction . ID , title : localize ( 'multipleTabs' , "Multiple Tabs" ) , toggled : ContextKeyExpr . equals ( 'config.workbench.editor.showTabs' , 'multiple' ) } , group : '1_config' , order : 10 } ) ;
365
370
MenuRegistry . appendMenuItem ( MenuId . EditorTabsBarShowTabsSubmenu , { command : { id : ShowSingleEditorTabAction . ID , title : localize ( 'singleTab' , "Single Tab" ) , toggled : ContextKeyExpr . equals ( 'config.workbench.editor.showTabs' , 'single' ) } , group : '1_config' , order : 20 } ) ;
366
371
MenuRegistry . appendMenuItem ( MenuId . EditorTabsBarShowTabsSubmenu , { command : { id : HideEditorTabsAction . ID , title : localize ( 'hideTabBar' , "Hide" ) , toggled : ContextKeyExpr . equals ( 'config.workbench.editor.showTabs' , 'none' ) } , group : '1_config' , order : 30 } ) ;
367
372
368
- MenuRegistry . appendMenuItem ( MenuId . EditorTabsBarContext , { submenu : MenuId . EditorActionsPositionSubmenu , title : localize ( 'editorActionsPosition' , "Editor Actions Position" ) , group : '3_config ' , order : 20 } ) ;
373
+ MenuRegistry . appendMenuItem ( MenuId . EditorTabsBarContext , { submenu : MenuId . EditorActionsPositionSubmenu , title : localize ( 'editorActionsPosition' , "Editor Actions Position" ) , group : '4_config ' , order : 20 } ) ;
369
374
MenuRegistry . appendMenuItem ( MenuId . EditorActionsPositionSubmenu , { command : { id : EditorActionsDefaultAction . ID , title : localize ( 'tabBar' , "Tab Bar" ) , toggled : ContextKeyExpr . equals ( 'config.workbench.editor.editorActionsLocation' , 'default' ) } , group : '1_config' , order : 10 , when : ContextKeyExpr . equals ( 'config.workbench.editor.showTabs' , 'none' ) . negate ( ) } ) ;
370
375
MenuRegistry . appendMenuItem ( MenuId . EditorActionsPositionSubmenu , { command : { id : EditorActionsTitleBarAction . ID , title : localize ( 'titleBar' , "Title Bar" ) , 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 ( ) } ) ;
371
376
MenuRegistry . appendMenuItem ( MenuId . EditorActionsPositionSubmenu , { command : { id : HideEditorActionsAction . ID , title : localize ( 'hidden' , "Hidden" ) , 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 } ) ;
@@ -387,6 +392,7 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: SPLIT_ED
387
392
MenuRegistry . appendMenuItem ( MenuId . EditorTitleContext , { command : { id : SPLIT_EDITOR_IN_GROUP , title : localize ( 'splitInGroup' , "Split in Group" ) } , group : '5_split' , order : 50 , when : ActiveEditorCanSplitInGroupContext } ) ;
388
393
MenuRegistry . appendMenuItem ( MenuId . EditorTitleContext , { command : { id : JOIN_EDITOR_IN_GROUP , title : localize ( 'joinInGroup' , "Join in Group" ) } , group : '5_split' , order : 50 , when : SideBySideEditorActiveContext } ) ;
389
394
MenuRegistry . appendMenuItem ( MenuId . EditorTitleContext , { command : { id : MOVE_EDITOR_INTO_NEW_WINDOW_COMMAND_ID , title : localize ( 'moveToNewWindow' , "Move into New Window" ) } , group : '6_new_window' , order : 10 } ) ;
395
+ MenuRegistry . appendMenuItem ( MenuId . EditorTitleContext , { command : { id : COPY_EDITOR_INTO_NEW_WINDOW_COMMAND_ID , title : localize ( 'copyToNewWindow' , "Copy into New Window" ) } , group : '6_new_window' , order : 20 } ) ;
390
396
391
397
// Editor Title Menu
392
398
MenuRegistry . appendMenuItem ( MenuId . EditorTitle , { command : { id : TOGGLE_DIFF_SIDE_BY_SIDE , title : localize ( 'inlineView' , "Inline View" ) , toggled : ContextKeyExpr . equals ( 'config.diffEditor.renderSideBySide' , false ) } , group : '1_diff' , order : 10 , when : ContextKeyExpr . has ( 'isInDiffEditor' ) } ) ;
0 commit comments