diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 79d24b87499..d7cffd9896a 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -3540,7 +3540,7 @@ declare module 'vscode' { /** * Controls the behaviour of the terminal's visibility. */ - export enum RevealKind { + export enum TaskRevealKind { /** * Always brings the terminal to front if the task is executed. */ @@ -3559,14 +3559,14 @@ declare module 'vscode' { } /** - * Controls terminal specific behaviour. + * Controls terminal specific behavior. */ - export interface TerminalBehaviour { + export interface TaskTerminalBehavior { /** * Controls whether the terminal executing a task is brought to front or not. * Defaults to `RevealKind.Always`. */ - reveal?: RevealKind; + reveal?: TaskRevealKind; /** * Controls whether the command is echoed in the terminal or not. @@ -3574,7 +3574,7 @@ declare module 'vscode' { echo?: boolean; } - export interface ProcessOptions { + export interface ProcessTaskOptions { /** * The current working directory of the executed program or shell. * If omitted the tools current workspace root is used. @@ -3595,7 +3595,8 @@ declare module 'vscode' { */ export const Clean: 'clean'; /** - * The build task group + * The build task group. If a task is part of the build task group + * it can be executed via the run build short cut. */ export const Build: 'build'; /** @@ -3603,7 +3604,8 @@ declare module 'vscode' { */ export const RebuildAll: 'rebuildAll'; /** - * The test task group + * The test task group. If a task is part of the test task group + * it can be executed via the run test short cut. */ export const Test: 'test'; } @@ -3646,7 +3648,7 @@ declare module 'vscode' { * @param options additional options for the started process. * @param problemMatchers the problem matchers to use. */ - constructor(name: string, process: string, args: string[], options: ProcessOptions, problemMatchers?: ProblemMatchers); + constructor(name: string, process: string, args: string[], options: ProcessTaskOptions, problemMatchers?: ProblemMatchers); /** * The task's name @@ -3692,12 +3694,12 @@ declare module 'vscode' { * The process options used when the process is executed. * Defaults to an empty object literal. */ - options: ProcessOptions; + options: ProcessTaskOptions; /** - * The terminal options. Defaults to an empty object literal. + * The terminal behavior. Defaults to an empty object literal. */ - terminal: TerminalBehaviour; + terminal: TaskTerminalBehavior; /** * The problem matchers attached to the task. Defaults to an empty @@ -3706,7 +3708,7 @@ declare module 'vscode' { problemMatchers: string[]; } - export type ShellOptions = { + export type ShellTaskOptions = { /** * The shell executable. */ @@ -3779,7 +3781,7 @@ declare module 'vscode' { * @param options additional options used when creating the shell. * @param problemMatchers the problem matchers to use. */ - constructor(name: string, commandLine: string, options: ShellOptions, problemMatchers?: ProblemMatchers); + constructor(name: string, commandLine: string, options: ShellTaskOptions, problemMatchers?: ProblemMatchers); /** * The task's name @@ -3820,12 +3822,12 @@ declare module 'vscode' { * The shell options used when the shell is executed. Defaults to an * empty object literal. */ - options: ShellOptions; + options: ShellTaskOptions; /** - * The terminal options. Defaults to an empty object literal. + * The terminal behavior. Defaults to an empty object literal. */ - terminal: TerminalBehaviour; + terminal: TaskTerminalBehavior; /** * The problem matchers attached to the task. Defaults to an empty diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index eda65776c32..1ec2c22afa3 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -537,7 +537,7 @@ export function createApiFactory( TreeItemCollapsibleState: extHostTypes.TreeItemCollapsibleState, ThemeColor: extHostTypes.ThemeColor, // functions - RevealKind: extHostTypes.RevealKind, + TaskRevealKind: extHostTypes.TaskRevealKind, TaskGroup: extHostTypes.TaskGroup, ShellTask: extHostTypes.ShellTask, ProcessTask: extHostTypes.ProcessTask diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index 7508d947d45..239aa99dabc 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -191,15 +191,15 @@ namespace ProblemMatcher { } */ -namespace RevealKind { - export function from(value: vscode.RevealKind): TaskSystem.RevealKind { +namespace TaskRevealKind { + export function from(value: vscode.TaskRevealKind): TaskSystem.RevealKind { if (value === void 0 || value === null) { return TaskSystem.RevealKind.Always; } switch (value) { - case types.RevealKind.Silent: + case types.TaskRevealKind.Silent: return TaskSystem.RevealKind.Silent; - case types.RevealKind.Never: + case types.TaskRevealKind.Never: return TaskSystem.RevealKind.Never; } return TaskSystem.RevealKind.Always; @@ -207,11 +207,11 @@ namespace RevealKind { } namespace TerminalBehaviour { - export function from(value: vscode.TerminalBehaviour): TaskSystem.TerminalBehavior { + export function from(value: vscode.TaskTerminalBehavior): TaskSystem.TerminalBehavior { if (value === void 0 || value === null) { return { reveal: TaskSystem.RevealKind.Always, echo: false }; } - return { reveal: RevealKind.from(value.reveal), echo: !!value.echo }; + return { reveal: TaskRevealKind.from(value.reveal), echo: !!value.echo }; } } @@ -230,10 +230,10 @@ namespace Strings { } namespace CommandOptions { - function isShellOptions(value: any): value is vscode.ShellOptions { + function isShellOptions(value: any): value is vscode.ShellTaskOptions { return value && typeof value.executable === 'string'; } - export function from(value: vscode.ShellOptions | vscode.ProcessOptions): TaskSystem.CommandOptions { + export function from(value: vscode.ShellTaskOptions | vscode.ProcessTaskOptions): TaskSystem.CommandOptions { if (value === void 0 || value === null) { return undefined; } diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index 353765544fd..7305e672df6 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1029,7 +1029,7 @@ export enum ApplyToKind { ClosedDocuments = 3 } -export enum RevealKind { +export enum TaskRevealKind { Always = 1, Silent = 2, @@ -1045,7 +1045,7 @@ export class BaseTask { private _isBackground: boolean; private _source: string; private _group: string; - private _terminal: vscode.TerminalBehaviour; + private _terminal: vscode.TaskTerminalBehavior; constructor(name: string, problemMatchers: string[]) { if (typeof name !== 'string') { @@ -1116,11 +1116,11 @@ export class BaseTask { this._group = value; } - get terminal(): vscode.TerminalBehaviour { + get terminal(): vscode.TaskTerminalBehavior { return this._terminal; } - set terminal(value: vscode.TerminalBehaviour) { + set terminal(value: vscode.TaskTerminalBehavior) { if (value === void 0 || value === null) { value = Object.create(null); } @@ -1149,7 +1149,7 @@ namespace ProblemMatcher { */ namespace ShellOptions { - export function is(value: any): value is vscode.ShellOptions { + export function is(value: any): value is vscode.ShellTaskOptions { return value && ((typeof value.executable === 'string') || (typeof value.cwd === 'string') || !!value.env); } } @@ -1184,16 +1184,16 @@ export class ProcessTask extends BaseTask { private _process: string; private _args: string[]; - private _options: vscode.ProcessOptions; + private _options: vscode.ProcessTaskOptions; constructor(name: string, process: string, args?: string[], problemMatchers?: vscode.ProblemMatchers); - constructor(name: string, process: string, args: string[] | undefined, options: vscode.ProcessOptions, problemMatchers?: vscode.ProblemMatchers); - constructor(name: string, process: string, arg3?: string[], arg4?: vscode.ProcessOptions | vscode.ProblemMatchers, arg5?: vscode.ProblemMatchers) { + constructor(name: string, process: string, args: string[] | undefined, options: vscode.ProcessTaskOptions, problemMatchers?: vscode.ProblemMatchers); + constructor(name: string, process: string, arg3?: string[], arg4?: vscode.ProcessTaskOptions | vscode.ProblemMatchers, arg5?: vscode.ProblemMatchers) { if (typeof process !== 'string') { throw illegalArgument('process'); } let args: string[]; - let options: vscode.ProcessOptions; + let options: vscode.ProcessTaskOptions; let problemMatchers: vscode.ProblemMatchers; args = arg3 || []; @@ -1235,11 +1235,11 @@ export class ProcessTask extends BaseTask { this._args = value; } - get options(): vscode.ProcessOptions { + get options(): vscode.ProcessTaskOptions { return this._options; } - set options(value: vscode.ProcessOptions) { + set options(value: vscode.ProcessTaskOptions) { if (value === void 0 || value === null) { value = Object.create(null); } @@ -1250,15 +1250,15 @@ export class ProcessTask extends BaseTask { export class ShellTask extends BaseTask implements vscode.ShellTask { private _commandLine: string; - private _options: vscode.ShellOptions; + private _options: vscode.ShellTaskOptions; constructor(name: string, commandLine: string, problemMatchers?: vscode.ProblemMatchers); - constructor(name: string, commandLine: string, options: vscode.ShellOptions, problemMatchers?: vscode.ProblemMatchers); - constructor(name: string, commandLine: string, optionsOrProblemMatchers?: vscode.ShellOptions | vscode.ProblemMatchers, problemMatchers?: vscode.ProblemMatchers) { + constructor(name: string, commandLine: string, options: vscode.ShellTaskOptions, problemMatchers?: vscode.ProblemMatchers); + constructor(name: string, commandLine: string, optionsOrProblemMatchers?: vscode.ShellTaskOptions | vscode.ProblemMatchers, problemMatchers?: vscode.ProblemMatchers) { if (typeof commandLine !== 'string') { throw illegalArgument('commandLine'); } - let options: vscode.ShellOptions = undefined; + let options: vscode.ShellTaskOptions = undefined; let pm: string[]; if (ShellOptions.is(optionsOrProblemMatchers)) { options = optionsOrProblemMatchers; @@ -1280,11 +1280,11 @@ export class ShellTask extends BaseTask implements vscode.ShellTask { return this._commandLine; } - get options(): vscode.ShellOptions { + get options(): vscode.ShellTaskOptions { return this._options; } - set options(value: vscode.ShellOptions) { + set options(value: vscode.ShellTaskOptions) { if (value === void 0 || value === null) { value = Object.create(null); }