Merge from master

This commit is contained in:
Raj Musuku
2019-02-21 17:56:04 -08:00
parent 5a146e34fa
commit 666ae11639
11482 changed files with 119352 additions and 255574 deletions

View File

@@ -3,9 +3,6 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { TPromise } from 'vs/base/common/winjs.base';
import * as nls from 'vs/nls';
import { Action } from 'vs/base/common/actions';
import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen';
@@ -22,19 +19,19 @@ export const defaultQuickOpenContext = ContextKeyExpr.and(inQuickOpenContext, Co
export const QUICKOPEN_ACTION_ID = 'workbench.action.quickOpen';
export const QUICKOPEN_ACION_LABEL = nls.localize('quickOpen', "Go to File...");
CommandsRegistry.registerCommand(QUICKOPEN_ACTION_ID, function (accessor: ServicesAccessor, prefix: string = null) {
CommandsRegistry.registerCommand(QUICKOPEN_ACTION_ID, function (accessor: ServicesAccessor, prefix: string | null = null) {
const quickOpenService = accessor.get(IQuickOpenService);
return quickOpenService.show(typeof prefix === 'string' ? prefix : null).then(() => {
return quickOpenService.show(typeof prefix === 'string' ? prefix : undefined).then(() => {
return void 0;
});
});
export const QUICKOPEN_FOCUS_SECONDARY_ACTION_ID = 'workbench.action.quickOpenPreviousEditor';
CommandsRegistry.registerCommand(QUICKOPEN_FOCUS_SECONDARY_ACTION_ID, function (accessor: ServicesAccessor, prefix: string = null) {
CommandsRegistry.registerCommand(QUICKOPEN_FOCUS_SECONDARY_ACTION_ID, function (accessor: ServicesAccessor, prefix: string | null = null) {
const quickOpenService = accessor.get(IQuickOpenService);
return quickOpenService.show(null, { autoFocus: { autoFocusSecondEntry: true } }).then(() => {
return quickOpenService.show(undefined, { autoFocus: { autoFocusSecondEntry: true } }).then(() => {
return void 0;
});
});
@@ -53,14 +50,14 @@ export class BaseQuickOpenNavigateAction extends Action {
super(id, label);
}
run(event?: any): TPromise<any> {
run(event?: any): Thenable<any> {
const keys = this.keybindingService.lookupKeybindings(this.id);
const quickNavigate = this.quickNavigate ? { keybindings: keys } : void 0;
this.quickOpenService.navigate(this.next, quickNavigate);
this.quickInputService.navigate(this.next, quickNavigate);
return TPromise.as(true);
return Promise.resolve(true);
}
}
@@ -73,8 +70,8 @@ export function getQuickNavigateHandler(id: string, next?: boolean): ICommandHan
const keys = keybindingService.lookupKeybindings(id);
const quickNavigate = { keybindings: keys };
quickOpenService.navigate(next, quickNavigate);
quickInputService.navigate(next, quickNavigate);
quickOpenService.navigate(!!next, quickNavigate);
quickInputService.navigate(!!next, quickNavigate);
};
}
@@ -140,4 +137,4 @@ export class QuickOpenSelectPreviousAction extends BaseQuickOpenNavigateAction {
) {
super(id, label, false, false, quickOpenService, quickInputService, keybindingService);
}
}
}