Decide on multi root actions naming (fixes #29434)

This commit is contained in:
Benjamin Pasero
2017-06-28 10:22:48 +02:00
parent 3e4a7d1e89
commit 1401409315
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -354,7 +354,7 @@ export class CodeMenu {
const openRecent = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miOpenRecent', comment: ['&& denotes a mnemonic'] }, "Open &&Recent")), submenu: openRecentMenu, enabled: openRecentMenu.items.length > 0 });
const isMultiRootEnabled = (product.quality !== 'stable'); // TODO@Ben multi root
const addFolder = this.createMenuItem(nls.localize({ key: 'miAddRootFolder', comment: ['&& denotes a mnemonic'] }, "&&Add Root Folder"), 'workbench.action.addRootFolder', this.windowsService.getWindowCount() > 0);
const addFolder = this.createMenuItem(nls.localize({ key: 'miAddFolderToWorkspace', comment: ['&& denotes a mnemonic'] }, "&&Add Folder to Workspace..."), 'workbench.action.addRootFolder', this.windowsService.getWindowCount() > 0);
const saveFile = this.createMenuItem(nls.localize({ key: 'miSave', comment: ['&& denotes a mnemonic'] }, "&&Save"), 'workbench.action.files.save', this.windowsService.getWindowCount() > 0);
const saveFileAs = this.createMenuItem(nls.localize({ key: 'miSaveAs', comment: ['&& denotes a mnemonic'] }, "Save &&As..."), 'workbench.action.files.saveAs', this.windowsService.getWindowCount() > 0);
@@ -54,7 +54,7 @@ export class OpenFileFolderAction extends Action {
export class AddRootFolderAction extends Action {
static ID = 'workbench.action.addRootFolder';
static LABEL = nls.localize('addFolder', "Add Root Folder...");
static LABEL = nls.localize('addFolderToWorkspace', "Add Folder to Workspace...");
constructor(
id: string,
@@ -72,7 +72,7 @@ export class AddRootFolderAction extends Action {
return this.windowService.pickFolderAndOpen(false /* prefer same window */);
}
return this.windowService.pickFolder({ buttonLabel: nls.localize('add', "Add"), title: nls.localize('addRootFolder', "Add Root Folder") }).then(folders => {
return this.windowService.pickFolder({ buttonLabel: nls.localize('add', "Add"), title: nls.localize('addFolderToWorkspaceTitle', "Add Folder to Workspace") }).then(folders => {
return this.workspaceEditingService.addRoots(folders.map(folder => URI.file(folder))).then(() => {
return this.viewletService.openViewlet(this.viewletService.getDefaultViewletId(), true);
});
@@ -83,7 +83,7 @@ export class AddRootFolderAction extends Action {
export class RemoveRootFolderAction extends Action {
static ID = 'workbench.action.removeRootFolder';
static LABEL = nls.localize('removeRootFolder', "Remove Root Folder");
static LABEL = nls.localize('removeFolderFromWorkspace', "Remove Folder from Workspace");
constructor(
private rootUri: URI,
@@ -83,7 +83,7 @@ workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(Decrea
// TODO@Ben multi root
if (product.quality !== 'stable') {
workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(AddRootFolderAction, AddRootFolderAction.ID, AddRootFolderAction.LABEL), 'Files: Add Root Folder...', fileCategory);
workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(AddRootFolderAction, AddRootFolderAction.ID, AddRootFolderAction.LABEL), 'Files: Add Folder to Workspace...', fileCategory);
}
// Developer related actions