Skip to content

Commit

Permalink
move editor features to submenu in view menu
Browse files Browse the repository at this point in the history
refs #158458
  • Loading branch information
sbatten committed Oct 10, 2022
1 parent e929233 commit a1efa1d
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class ToggleStickyScroll extends Action2 {
},
menu: [
{ id: MenuId.CommandPalette },
{ id: MenuId.MenubarViewMenu, group: '5_editor', order: 6 },
{ id: MenuId.MenubarEditorFeaturesMenu, order: 6 },
{ id: MenuId.StickyScrollContext }
]
});
Expand Down
1 change: 1 addition & 0 deletions src/vs/platform/actions/common/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export class MenuId {
static readonly MenubarGoMenu = new MenuId('MenubarGoMenu');
static readonly MenubarHelpMenu = new MenuId('MenubarHelpMenu');
static readonly MenubarLayoutMenu = new MenuId('MenubarLayoutMenu');
static readonly MenubarEditorFeaturesMenu = new MenuId('MenubarEditorFeaturesMenu');
static readonly MenubarNewBreakpointMenu = new MenuId('MenubarNewBreakpointMenu');
static readonly MenubarPanelAlignmentMenu = new MenuId('MenubarPanelAlignmentMenu');
static readonly MenubarPanelPositionMenu = new MenuId('MenubarPanelPositionMenu');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ registerAction2(class ToggleBreadcrumb extends Action2 {
},
menu: [
{ id: MenuId.CommandPalette },
{ id: MenuId.MenubarViewMenu, group: '5_editor', order: 3 },
{ id: MenuId.MenubarEditorFeaturesMenu, order: 3 },
{ id: MenuId.NotebookToolbar, group: 'notebookLayout', order: 2 },
{ id: MenuId.StickyScrollContext }
]
Expand Down
8 changes: 8 additions & 0 deletions src/vs/workbench/browser/parts/editor/editor.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,14 @@ MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
order: 9
});

// Features menu
MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, {
group: '2_appearance',
title: localize({ key: 'miEditorFeatures', comment: ['&& denotes a mnemonic'] }, "Editor &&Features"),
submenu: MenuId.MenubarEditorFeaturesMenu,
order: 3
});

// Main Menu Bar Contributions:

MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
Expand Down
3 changes: 1 addition & 2 deletions src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ export class ToggleMinimapAction extends Action2 {
f1: true,
toggled: ContextKeyExpr.equals('config.editor.minimap.enabled', true),
menu: {
id: MenuId.MenubarViewMenu,
group: '5_editor',
id: MenuId.MenubarEditorFeaturesMenu,
order: 2
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ export class ToggleRenderControlCharacterAction extends Action2 {
f1: true,
toggled: ContextKeyExpr.equals('config.editor.renderControlCharacters', true),
menu: {
id: MenuId.MenubarViewMenu,
group: '5_editor',
id: MenuId.MenubarEditorFeaturesMenu,
order: 5
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ class ToggleRenderWhitespaceAction extends Action2 {
f1: true,
toggled: ContextKeyExpr.notEquals('config.editor.renderWhitespace', 'none'),
menu: {
id: MenuId.MenubarViewMenu,
group: '5_editor',
id: MenuId.MenubarEditorFeaturesMenu,
order: 4
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,7 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, {


// View menu
MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, {
group: '5_editor',
MenuRegistry.appendMenuItem(MenuId.MenubarEditorFeaturesMenu, {
command: {
id: TOGGLE_WORD_WRAP_ID,
title: nls.localize({ key: 'miToggleWordWrap', comment: ['&& denotes a mnemonic'] }, "&&Word Wrap"),
Expand Down

0 comments on commit a1efa1d

Please sign in to comment.