this.accessor.groups.some(groupView=>groupView!==this&&groupView.group.contains(editor,true/* support side by side */))||// editor is opened in other group
returnthis.quickInputService.pick([{label:nls.localize('noEditor',"No text editor active at this time")}]);
...
...
@@ -1030,31 +1030,30 @@ export class ChangeModeAction extends Action {
};
});
setTimeout(()=>{
this.quickInputService.pick(picks,{placeHolder:nls.localize('pickLanguageToConfigure',"Select Language Mode to Associate with '{0}'",extension||base)}).then(language=>{
constlanguage=awaitthis.quickInputService.pick(picks,{placeHolder:nls.localize('pickLanguageToConfigure',"Select Language Mode to Associate with '{0}'",extension||base)});
returnthis.quickInputService.pick(EOLOptions,{placeHolder:nls.localize('pickEndOfLine',"Select End of Line Sequence"),activeItem:EOLOptions[selectedIndex]}).then(eol=>{
consteol=awaitthis.quickInputService.pick(EOLOptions,{placeHolder:nls.localize('pickEndOfLine',"Select End of Line Sequence"),activeItem:EOLOptions[selectedIndex]});
constplaceHolderLabel=(typeofcanRun==='string')?canRun:nls.localize('canNotRunPlaceholder',"This quick open handler can not be used in the current context");
// Return early if the handler can not run in the current environment and inform the user
constplaceHolderLabel=(typeofcanRun==='string')?canRun:nls.localize('canNotRunPlaceholder',"This quick open handler can not be used in the current context");
@@ -837,7 +828,7 @@ export class RemoveFromEditorHistoryAction extends Action {
super(id,label);
}
run():Promise<any>{
asyncrun():Promise<any>{
interfaceIHistoryPickEntryextendsIQuickPickItem{
input:IEditorInput|IResourceInput;
}
...
...
@@ -854,11 +845,10 @@ export class RemoveFromEditorHistoryAction extends Action {
};
});
returnthis.quickInputService.pick(picks,{placeHolder:nls.localize('pickHistory',"Select an editor entry to remove from history"),matchOnDescription:true}).then(pick=>{
if(pick){
this.historyService.remove(pick.input);
}
});
constpick=awaitthis.quickInputService.pick(picks,{placeHolder:nls.localize('pickHistory',"Select an editor entry to remove from history"),matchOnDescription:true});
awaitviewletService.openViewlet(viewletService.getDefaultViewletId());// fallback to default viewlet as needed
}
mark('didRestoreViewlet');
})());
}
// Restore Panel
...
...
@@ -394,23 +401,24 @@ export class Workbench extends Layout {
// Emit a warning after 10s if restore does not complete
constrestoreTimeoutHandle=setTimeout(()=>logService.warn('Workbench did not finish loading in 10 seconds, that might be a problem that should be reported.'),10000);
returnPromise.all(restorePromises)
.then(()=>clearTimeout(restoreTimeoutHandle))
.catch(error=>onUnexpectedError(error))
.finally(()=>{
try{
awaitPromise.all(restorePromises);
// Set lifecycle phase to `Restored`
lifecycleService.phase=LifecyclePhase.Restored;
clearTimeout(restoreTimeoutHandle);
}catch(error){
onUnexpectedError(error);
}finally{
// Set lifecycle phase to `Eventually` after a short delay and when idle (min 2.5sec, max 5sec)
setTimeout(()=>{
this._register(runWhenIdle(()=>{
lifecycleService.phase=LifecyclePhase.Eventually;
},2500));
},2500);
// Set lifecycle phase to `Restored`
lifecycleService.phase=LifecyclePhase.Restored;
// Telemetry: startup metrics
mark('didStartWorkbench');
});
// Set lifecycle phase to `Eventually` after a short delay and when idle (min 2.5sec, max 5sec)
placeHolder:isMacintosh?nls.localize('openRecentPlaceHolderMac',"Select to open (hold Cmd-key to open in new window)"):nls.localize('openRecentPlaceHolder',"Select to open (hold Ctrl-key to open in new window)"),