Skip to content

Commit

Permalink
web - show "Open Folder" in file menu too (fix #135561)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Jan 20, 2022
1 parent 0c6d1e9 commit 12f9c5f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/vs/workbench/browser/actions/workspaceActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,19 @@ MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
when: OpenFolderWorkspaceSupportContext
});

MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
group: '2_open',
command: {
// When we do not support opening folders/workspaces
// but we are in a workspace context, we add a
// "Open Folder" action that adds the folder as workspace
id: AddRootFolderAction.ID,
title: localize({ key: 'miOpenFolder', comment: ['&& denotes a mnemonic'] }, "Open &&Folder...")
},
order: 2,
when: ContextKeyExpr.and(OpenFolderWorkspaceSupportContext.toNegated(), WorkbenchStateContext.isEqualTo('workspace'))
});

MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
group: '2_open',
command: {
Expand Down

0 comments on commit 12f9c5f

Please sign in to comment.