dockMenu.append(newMenuItem({label:mnemonicLabel(nls.localize({key:'miNewWindow',comment:['&& denotes a mnemonic']},"&&New Window")),click:()=>this.windowsManager.openNewWindow()}));
dockMenu.append(newMenuItem({label:mnemonicLabel(nls.localize({key:'miNewWindow',comment:['&& denotes a mnemonic']},"&&New Window")),click:()=>this.windowsService.openNewWindow()}));
newFile=newMenuItem({label:mnemonicLabel(nls.localize({key:'miNewFile',comment:['&& denotes a mnemonic']},"&&New File")),accelerator:this.getAccelerator('workbench.action.files.newUntitledFile'),click:()=>this.windowsManager.openNewWindow()});
newFile=newMenuItem({label:mnemonicLabel(nls.localize({key:'miNewFile',comment:['&& denotes a mnemonic']},"&&New File")),accelerator:this.getAccelerator('workbench.action.files.newUntitledFile'),click:()=>this.windowsService.openNewWindow()});
}else{
newFile=this.createMenuItem(nls.localize({key:'miNewFile',comment:['&& denotes a mnemonic']},"&&New File"),'workbench.action.files.newUntitledFile');
}
letopen=newMenuItem({label:mnemonicLabel(nls.localize({key:'miOpen',comment:['&& denotes a mnemonic']},"&&Open...")),accelerator:this.getAccelerator('workbench.action.files.openFileFolder'),click:()=>this.windowsManager.openFileFolderPicker()});
letopenFolder=newMenuItem({label:mnemonicLabel(nls.localize({key:'miOpenFolder',comment:['&& denotes a mnemonic']},"Open &&Folder...")),accelerator:this.getAccelerator('workbench.action.files.openFolder'),click:()=>this.windowsManager.openFolderPicker()});
letopen=newMenuItem({label:mnemonicLabel(nls.localize({key:'miOpen',comment:['&& denotes a mnemonic']},"&&Open...")),accelerator:this.getAccelerator('workbench.action.files.openFileFolder'),click:()=>this.windowsService.openFileFolderPicker()});
letopenFolder=newMenuItem({label:mnemonicLabel(nls.localize({key:'miOpenFolder',comment:['&& denotes a mnemonic']},"Open &&Folder...")),accelerator:this.getAccelerator('workbench.action.files.openFolder'),click:()=>this.windowsService.openFolderPicker()});
letopenFile:Electron.MenuItem;
if(hasNoWindows){
openFile=newMenuItem({label:mnemonicLabel(nls.localize({key:'miOpenFile',comment:['&& denotes a mnemonic']},"&&Open File...")),accelerator:this.getAccelerator('workbench.action.files.openFile'),click:()=>this.windowsManager.openFilePicker()});
openFile=newMenuItem({label:mnemonicLabel(nls.localize({key:'miOpenFile',comment:['&& denotes a mnemonic']},"&&Open File...")),accelerator:this.getAccelerator('workbench.action.files.openFile'),click:()=>this.windowsService.openFilePicker()});
}else{
openFile=this.createMenuItem(nls.localize({key:'miOpenFile',comment:['&& denotes a mnemonic']},"&&Open File..."),'workbench.action.files.openFile');
}
...
...
@@ -321,15 +321,15 @@ export class VSCodeMenu {
this.setOpenRecentMenu(openRecentMenu);
letopenRecent=newMenuItem({label:mnemonicLabel(nls.localize({key:'miOpenRecent',comment:['&& denotes a mnemonic']},"Open &&Recent")),submenu:openRecentMenu,enabled:openRecentMenu.items.length>0});
letsaveFile=this.createMenuItem(nls.localize({key:'miSave',comment:['&& denotes a mnemonic']},"&&Save"),'workbench.action.files.save',this.windowsManager.getWindowCount()>0);
letsaveFileAs=this.createMenuItem(nls.localize({key:'miSaveAs',comment:['&& denotes a mnemonic']},"Save &&As..."),'workbench.action.files.saveAs',this.windowsManager.getWindowCount()>0);
letsaveAllFiles=this.createMenuItem(nls.localize({key:'miSaveAll',comment:['&& denotes a mnemonic']},"Save A&&ll"),'workbench.action.files.saveAll',this.windowsManager.getWindowCount()>0);
letsaveFile=this.createMenuItem(nls.localize({key:'miSave',comment:['&& denotes a mnemonic']},"&&Save"),'workbench.action.files.save',this.windowsService.getWindowCount()>0);
letsaveFileAs=this.createMenuItem(nls.localize({key:'miSaveAs',comment:['&& denotes a mnemonic']},"Save &&As..."),'workbench.action.files.saveAs',this.windowsService.getWindowCount()>0);
letsaveAllFiles=this.createMenuItem(nls.localize({key:'miSaveAll',comment:['&& denotes a mnemonic']},"Save A&&ll"),'workbench.action.files.saveAll',this.windowsService.getWindowCount()>0);
letpreferences=this.getPreferencesMenu();
letnewWindow=newMenuItem({label:mnemonicLabel(nls.localize({key:'miNewWindow',comment:['&& denotes a mnemonic']},"&&New Window")),accelerator:this.getAccelerator('workbench.action.newWindow'),click:()=>this.windowsManager.openNewWindow()});
letrevertFile=this.createMenuItem(nls.localize({key:'miRevert',comment:['&& denotes a mnemonic']},"Revert F&&ile"),'workbench.action.files.revert',this.windowsManager.getWindowCount()>0);
letcloseWindow=newMenuItem({label:mnemonicLabel(nls.localize({key:'miCloseWindow',comment:['&& denotes a mnemonic']},"Close &&Window")),accelerator:this.getAccelerator('workbench.action.closeWindow'),click:()=>this.windowsManager.getLastActiveWindow().win.close(),enabled:this.windowsManager.getWindowCount()>0});
letnewWindow=newMenuItem({label:mnemonicLabel(nls.localize({key:'miNewWindow',comment:['&& denotes a mnemonic']},"&&New Window")),accelerator:this.getAccelerator('workbench.action.newWindow'),click:()=>this.windowsService.openNewWindow()});
letrevertFile=this.createMenuItem(nls.localize({key:'miRevert',comment:['&& denotes a mnemonic']},"Revert F&&ile"),'workbench.action.files.revert',this.windowsService.getWindowCount()>0);
letcloseWindow=newMenuItem({label:mnemonicLabel(nls.localize({key:'miCloseWindow',comment:['&& denotes a mnemonic']},"Close &&Window")),accelerator:this.getAccelerator('workbench.action.closeWindow'),click:()=>this.windowsService.getLastActiveWindow().win.close(),enabled:this.windowsService.getWindowCount()>0});
letcloseFolder=this.createMenuItem(nls.localize({key:'miCloseFolder',comment:['&& denotes a mnemonic']},"Close &&Folder"),'workbench.action.closeFolder');
letcloseEditor=this.createMenuItem(nls.localize({key:'miCloseEditor',comment:['&& denotes a mnemonic']},"Close &&Editor"),'workbench.action.closeActiveEditor');
...
...
@@ -384,8 +384,8 @@ export class VSCodeMenu {
// If the user selected to exit from an extension development host window, do not quit, but just
// close the window unless this is the last window that is opened.
letcommands=this.createMenuItem(nls.localize({key:'miCommandPalette',comment:['&& denotes a mnemonic']},"&&Command Palette..."),'workbench.action.showCommands');
letmarkers=this.createMenuItem(nls.localize({key:'miMarker',comment:['&& denotes a mnemonic']},"&&Errors and Warnings..."),'workbench.action.showErrorsWarnings');
letfullscreen=newMenuItem({label:mnemonicLabel(nls.localize({key:'miToggleFullScreen',comment:['&& denotes a mnemonic']},"Toggle &&Full Screen")),accelerator:this.getAccelerator('workbench.action.toggleFullScreen'),click:()=>this.windowsManager.getLastActiveWindow().toggleFullScreen(),enabled:this.windowsManager.getWindowCount()>0});
letfullscreen=newMenuItem({label:mnemonicLabel(nls.localize({key:'miToggleFullScreen',comment:['&& denotes a mnemonic']},"Toggle &&Full Screen")),accelerator:this.getAccelerator('workbench.action.toggleFullScreen'),click:()=>this.windowsService.getLastActiveWindow().toggleFullScreen(),enabled:this.windowsService.getWindowCount()>0});
lettoggleMenuBar=this.createMenuItem(nls.localize({key:'miToggleMenuBar',comment:['&& denotes a mnemonic']},"Toggle Menu &&Bar"),'workbench.action.toggleMenuBar');
letsplitEditor=this.createMenuItem(nls.localize({key:'miSplitEditor',comment:['&& denotes a mnemonic']},"Split &&Editor"),'workbench.action.splitEditor');
lettoggleSidebar=this.createMenuItem(nls.localize({key:'miToggleSidebar',comment:['&& denotes a mnemonic']},"&&Toggle Side Bar"),'workbench.action.toggleSidebarVisibility');
letbringAllToFront=newMenuItem({label:nls.localize('mBringToFront',"Bring All to Front"),role:'front',enabled:this.windowsManager.getWindowCount()>0});
letbringAllToFront=newMenuItem({label:nls.localize('mBringToFront',"Bring All to Front"),role:'front',enabled:this.windowsService.getWindowCount()>0});
[
minimize,
...
...
@@ -642,7 +642,7 @@ export class VSCodeMenu {
}
privatetoggleDevTools():void{
letw=this.windowsManager.getFocusedWindow();
letw=this.windowsService.getFocusedWindow();
if(w&&w.win){
w.win.webContents.toggleDevTools();
}
...
...
@@ -653,7 +653,7 @@ export class VSCodeMenu {
label:mnemonicLabel(nls.localize({key:'miToggleDevTools',comment:['&& denotes a mnemonic']},"&&Toggle Developer Tools")),
label:nls.localize('miDownloadUpdate',"Download Available Update"),click:()=>{
update.quitAndUpdate();
...
...
@@ -737,12 +737,12 @@ export class VSCodeMenu {
letresult=[newMenuItem({
label:nls.localize('miCheckForUpdates',"Check For Updates..."),click:()=>setTimeout(()=>{
this.reportMenuActionTelemetry('CheckForUpdate');
this.updateManager.checkForUpdates(true);
this.updateService.checkForUpdates(true);
},0)
})];
if(this.updateManager.lastCheckDate){
result.push(newMenuItem({label:nls.localize('miLastCheckedAt',"Last checked at {0}",this.updateManager.lastCheckDate.toLocaleTimeString()),enabled:false}));
if(this.updateService.lastCheckDate){
result.push(newMenuItem({label:nls.localize('miLastCheckedAt',"Last checked at {0}",this.updateService.lastCheckDate.toLocaleTimeString()),enabled:false}));