Update to VS Code 1.52.1

This commit is contained in:
Asher
2021-02-09 16:08:37 +00:00
1351 changed files with 56560 additions and 38990 deletions

View File

@@ -36,7 +36,7 @@ export interface IAction extends IDisposable {
export interface IActionRunner extends IDisposable {
run(action: IAction, context?: any): Promise<any>;
readonly onDidRun: Event<IRunEvent>;
readonly onDidBeforeRun: Event<IRunEvent>;
readonly onBeforeRun: Event<IRunEvent>;
}
export interface IActionViewItem extends IDisposable {
@@ -178,8 +178,8 @@ export interface IRunEvent {
export class ActionRunner extends Disposable implements IActionRunner {
private _onDidBeforeRun = this._register(new Emitter<IRunEvent>());
readonly onDidBeforeRun: Event<IRunEvent> = this._onDidBeforeRun.event;
private _onBeforeRun = this._register(new Emitter<IRunEvent>());
readonly onBeforeRun: Event<IRunEvent> = this._onBeforeRun.event;
private _onDidRun = this._register(new Emitter<IRunEvent>());
readonly onDidRun: Event<IRunEvent> = this._onDidRun.event;
@@ -189,7 +189,7 @@ export class ActionRunner extends Disposable implements IActionRunner {
return Promise.resolve(null);
}
this._onDidBeforeRun.fire({ action: action });
this._onBeforeRun.fire({ action: action });
try {
const result = await this.runAction(action, context);
@@ -235,6 +235,17 @@ export class Separator extends Action {
}
}
export class ActionWithMenuAction extends Action {
get actions(): IAction[] {
return this._actions;
}
constructor(id: string, private _actions: IAction[], label?: string, cssClass?: string, enabled?: boolean, actionCallback?: (event?: any) => Promise<any>) {
super(id, label, cssClass, enabled, actionCallback);
}
}
export class SubmenuAction extends Action {
get actions(): IAction[] {
@@ -242,7 +253,7 @@ export class SubmenuAction extends Action {
}
constructor(id: string, label: string, private _actions: IAction[], cssClass?: string) {
super(id, label, cssClass, true);
super(id, label, cssClass, !!_actions?.length);
}
}