mirror of
https://github.com/Microsoft/vscode
synced 2024-10-12 22:37:41 +00:00
web - only offer "Save Workspace As..." when supporting empty workspaces
The rationale is that the file system maybe in-memory and saving a workspace into such a file system will mean that after window reload we have to open an empty workspace because the workspace may not be persisted anymore.
This commit is contained in:
parent
02996aac27
commit
47625a0c05
|
@ -258,7 +258,7 @@ const workspacesCategory = nls.localize('workspaces', "Workspaces");
|
|||
registry.registerWorkbenchAction(SyncActionDescriptor.from(AddRootFolderAction), 'Workspaces: Add Folder to Workspace...', workspacesCategory);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(GlobalRemoveRootFolderAction), 'Workspaces: Remove Folder from Workspace...', workspacesCategory);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(CloseWorkspaceAction, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_F) }), 'Workspaces: Close Workspace', workspacesCategory, EmptyWorkspaceSupportContext);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(SaveWorkspaceAsAction), 'Workspaces: Save Workspace As...', workspacesCategory);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(SaveWorkspaceAsAction), 'Workspaces: Save Workspace As...', workspacesCategory, EmptyWorkspaceSupportContext);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(DuplicateWorkspaceInNewWindowAction), 'Workspaces: Duplicate Workspace in New Window', workspacesCategory);
|
||||
|
||||
// --- Menu Registration
|
||||
|
@ -282,7 +282,8 @@ MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
|
|||
id: SaveWorkspaceAsAction.ID,
|
||||
title: nls.localize('miSaveWorkspaceAs', "Save Workspace As...")
|
||||
},
|
||||
order: 2
|
||||
order: 2,
|
||||
when: EmptyWorkspaceSupportContext
|
||||
});
|
||||
|
||||
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
||||
|
|
Loading…
Reference in a new issue