Merge from vscode 1b314ab317fbff7d799b21754326b7d849889ceb

This commit is contained in:
ADS Merger
2020-07-15 23:51:18 +00:00
parent aae013d498
commit 9d3f12d0b7
554 changed files with 15159 additions and 8223 deletions

View File

@@ -62,7 +62,7 @@ export abstract class SimpleFindReplaceWidget extends Widget {
@IContextViewService private readonly _contextViewService: IContextViewService,
@IContextKeyService contextKeyService: IContextKeyService,
@IThemeService private readonly _themeService: IThemeService,
private readonly _state: FindReplaceState = new FindReplaceState(),
protected readonly _state: FindReplaceState = new FindReplaceState(),
showOptionButtons?: boolean
) {
super();
@@ -267,7 +267,7 @@ export abstract class SimpleFindReplaceWidget extends Widget {
public updateTheme(theme: IColorTheme): void {
const inputStyles: IFindInputStyles = {
inputActiveOptionBorder: theme.getColor(inputActiveOptionBorder),
inputActiveOptionForeground: theme.getColor(inputActiveOptionBackground),
inputActiveOptionForeground: theme.getColor(inputActiveOptionForeground),
inputActiveOptionBackground: theme.getColor(inputActiveOptionBackground),
inputBackground: theme.getColor(inputBackground),
inputForeground: theme.getColor(inputForeground),
@@ -280,7 +280,7 @@ export abstract class SimpleFindReplaceWidget extends Widget {
inputValidationWarningBorder: theme.getColor(inputValidationWarningBorder),
inputValidationErrorBackground: theme.getColor(inputValidationErrorBackground),
inputValidationErrorForeground: theme.getColor(inputValidationErrorForeground),
inputValidationErrorBorder: theme.getColor(inputValidationErrorBorder)
inputValidationErrorBorder: theme.getColor(inputValidationErrorBorder),
};
this._findInput.style(inputStyles);
const replaceStyles: IReplaceInputStyles = {
@@ -298,7 +298,7 @@ export abstract class SimpleFindReplaceWidget extends Widget {
inputValidationWarningBorder: theme.getColor(inputValidationWarningBorder),
inputValidationErrorBackground: theme.getColor(inputValidationErrorBackground),
inputValidationErrorForeground: theme.getColor(inputValidationErrorForeground),
inputValidationErrorBorder: theme.getColor(inputValidationErrorBorder)
inputValidationErrorBorder: theme.getColor(inputValidationErrorBorder),
};
this._replaceInput.style(replaceStyles);
}

View File

@@ -13,10 +13,10 @@ import { Registry } from 'vs/platform/registry/common/platform';
import { IQuickAccessRegistry, Extensions as QuickaccesExtensions } from 'vs/platform/quickinput/common/quickAccess';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IWorkbenchEditorConfiguration } from 'vs/workbench/common/editor';
import { Action } from 'vs/base/common/actions';
import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions';
import { SyncActionDescriptor } from 'vs/platform/actions/common/actions';
import { Action2, registerAction2 } from 'vs/platform/actions/common/actions';
import { KeyMod, KeyCode } from 'vs/base/common/keyCodes';
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
export class GotoLineQuickAccessProvider extends AbstractGotoLineQuickAccessProvider {
@@ -66,25 +66,25 @@ Registry.as<IQuickAccessRegistry>(QuickaccesExtensions.Quickaccess).registerQuic
helpEntries: [{ description: localize('gotoLineQuickAccess', "Go to Line/Column"), needsEditor: true }]
});
export class GotoLineAction extends Action {
class GotoLineAction extends Action2 {
static readonly ID = 'workbench.action.gotoLine';
static readonly LABEL = localize('gotoLine', "Go to Line/Column...");
constructor(
id: string,
label: string,
@IQuickInputService private readonly quickInputService: IQuickInputService
) {
super(id, label);
constructor() {
super({
id: 'workbench.action.gotoLine',
title: { value: localize('gotoLine', "Go to Line/Column..."), original: 'Go to Line/Column...' },
f1: true,
keybinding: {
weight: KeybindingWeight.WorkbenchContrib,
when: null,
primary: KeyMod.CtrlCmd | KeyCode.KEY_G,
mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_G }
}
});
}
async run(): Promise<void> {
this.quickInputService.quickAccess.show(GotoLineQuickAccessProvider.PREFIX);
async run(accessor: ServicesAccessor): Promise<void> {
accessor.get(IQuickInputService).quickAccess.show(GotoLineQuickAccessProvider.PREFIX);
}
}
Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions).registerWorkbenchAction(SyncActionDescriptor.from(GotoLineAction, {
primary: KeyMod.CtrlCmd | KeyCode.KEY_G,
mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_G }
}), 'Go to Line/Column...');
registerAction2(GotoLineAction);

View File

@@ -190,14 +190,10 @@ export class GotoSymbolQuickAccessProvider extends AbstractGotoSymbolQuickAccess
updatePickerItems();
disposables.add(picker.onDidChangeValue(updatePickerItems));
let ignoreFirstActiveEvent = true;
disposables.add(picker.onDidChangeActive(() => {
const [entry] = picker.activeItems;
if (entry && entries[entry.index]) {
if (!ignoreFirstActiveEvent) {
entries[entry.index]?.preview();
}
ignoreFirstActiveEvent = false;
if (entry) {
entries[entry.index]?.preview();
}
}));