Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add proposed explorer/context/share and editor/title/context/share menus #175688

Merged
merged 3 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/vs/editor/contrib/clipboard/browser/clipboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ export const CopyAction = supportsCopy ? registerCommand(new MultiCommand({
MenuRegistry.appendMenuItem(MenuId.MenubarEditMenu, { submenu: MenuId.MenubarCopy, title: { value: nls.localize('copy as', "Copy As"), original: 'Copy As', }, group: '2_ccp', order: 3 });
MenuRegistry.appendMenuItem(MenuId.EditorContext, { submenu: MenuId.EditorContextCopy, title: { value: nls.localize('copy as', "Copy As"), original: 'Copy As', }, group: CLIPBOARD_CONTEXT_MENU_GROUP, order: 3 });
MenuRegistry.appendMenuItem(MenuId.EditorContext, { submenu: MenuId.EditorContextShare, title: { value: nls.localize('share', "Share"), original: 'Share', }, group: '11_share', order: -1 });
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { submenu: MenuId.EditorTitleContextShare, title: { value: nls.localize('share', "Share"), original: 'Share', }, group: '11_share', order: -1 });
MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { submenu: MenuId.ExplorerContextShare, title: { value: nls.localize('share', "Share"), original: 'Share', }, group: '11_share', order: -1 });

export const PasteAction = supportsPaste ? registerCommand(new MultiCommand({
id: 'editor.action.clipboardPasteAction',
Expand Down
3 changes: 2 additions & 1 deletion src/vs/platform/actions/common/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ export class MenuId {
static readonly EditorTitle = new MenuId('EditorTitle');
static readonly EditorTitleRun = new MenuId('EditorTitleRun');
static readonly EditorTitleContext = new MenuId('EditorTitleContext');
static readonly EditorTitleContextShare = new MenuId('EditorTitleContextShare');
static readonly EmptyEditorGroup = new MenuId('EmptyEditorGroup');
static readonly EmptyEditorGroupContext = new MenuId('EmptyEditorGroupContext');
static readonly EditorTabsBarContext = new MenuId('EditorTabsBarContext');
static readonly ExplorerContext = new MenuId('ExplorerContext');
static readonly ExplorerContextShare = new MenuId('ExplorerContextShare');
static readonly ExtensionContext = new MenuId('ExtensionContext');
static readonly GlobalActivity = new MenuId('GlobalActivity');
static readonly CommandCenter = new MenuId('CommandCenter');
Expand Down
12 changes: 12 additions & 0 deletions src/vs/workbench/services/actions/common/menusExtensionPoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,23 @@ const apiMenus: IAPIMenu[] = [
id: MenuId.ExplorerContext,
description: localize('menus.explorerContext', "The file explorer context menu")
},
{
key: 'explorer/context/share',
id: MenuId.ExplorerContextShare,
description: localize('menus.explorerContextShare', "'Share' submenu in the file explorer context menu"),
proposed: 'contribShareMenu'
},
{
key: 'editor/title/context',
id: MenuId.EditorTitleContext,
description: localize('menus.editorTabContext', "The editor tabs context menu")
},
{
key: 'editor/title/context/share',
id: MenuId.EditorTitleContextShare,
description: localize('menus.editorTitleContextShare', "'Share' submenu inside the editor title context menu"),
proposed: 'contribShareMenu'
},
{
key: 'debug/callstack/context',
id: MenuId.DebugCallStackContext,
Expand Down