mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 19:18:59 +01:00
Remove 'terminal' as a used term from tasks.
This commit is contained in:
@@ -489,7 +489,7 @@ export function createApiFactory(
|
||||
ThemeColor: extHostTypes.ThemeColor,
|
||||
// functions
|
||||
TaskRevealKind: extHostTypes.TaskRevealKind,
|
||||
TaskInstanceKind: extHostTypes.TaskInstanceKind,
|
||||
TaskPanelKind: extHostTypes.TaskPanelKind,
|
||||
TaskGroup: extHostTypes.TaskGroup,
|
||||
ShellTask: extHostTypes.ShellTask,
|
||||
ProcessTask: extHostTypes.ProcessTask
|
||||
|
||||
@@ -207,32 +207,32 @@ namespace TaskRevealKind {
|
||||
}
|
||||
}
|
||||
|
||||
namespace TaskInstanceKind {
|
||||
export function from(value: vscode.TaskInstanceKind): TaskSystem.InstanceKind {
|
||||
namespace TaskPanelKind {
|
||||
export function from(value: vscode.TaskPanelKind): TaskSystem.PanelKind {
|
||||
if (value === void 0 || value === null) {
|
||||
return TaskSystem.InstanceKind.Shared;
|
||||
return TaskSystem.PanelKind.Shared;
|
||||
}
|
||||
switch (value) {
|
||||
case types.TaskInstanceKind.Same:
|
||||
return TaskSystem.InstanceKind.Same;
|
||||
case types.TaskInstanceKind.New:
|
||||
return TaskSystem.InstanceKind.New;
|
||||
case types.TaskPanelKind.Dedicated:
|
||||
return TaskSystem.PanelKind.Dedicated;
|
||||
case types.TaskPanelKind.New:
|
||||
return TaskSystem.PanelKind.New;
|
||||
default:
|
||||
return TaskSystem.InstanceKind.Shared;
|
||||
return TaskSystem.PanelKind.Shared;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace TerminalBehaviour {
|
||||
export function from(value: vscode.TaskTerminalBehavior): TaskSystem.TerminalBehavior {
|
||||
namespace PresentationOptions {
|
||||
export function from(value: vscode.TaskPresentationOptions): TaskSystem.PresentationOptions {
|
||||
if (value === void 0 || value === null) {
|
||||
return { reveal: TaskSystem.RevealKind.Always, echo: true, focus: false, instance: TaskSystem.InstanceKind.Shared };
|
||||
return { reveal: TaskSystem.RevealKind.Always, echo: true, focus: false, panel: TaskSystem.PanelKind.Shared };
|
||||
}
|
||||
return {
|
||||
reveal: TaskRevealKind.from(value.reveal),
|
||||
echo: value.echo === void 0 ? true : !!value.echo,
|
||||
focus: !!value.focus,
|
||||
instance: TaskInstanceKind.from(value.instance)
|
||||
panel: TaskPanelKind.from(value.panel)
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -359,7 +359,7 @@ namespace Tasks {
|
||||
args: Strings.from(value.args),
|
||||
type: TaskSystem.CommandType.Process,
|
||||
suppressTaskName: true,
|
||||
terminalBehavior: TerminalBehaviour.from(value.terminalBehavior)
|
||||
presentation: PresentationOptions.from(value.presentationOptions)
|
||||
};
|
||||
if (value.options) {
|
||||
result.options = CommandOptions.from(value.options);
|
||||
@@ -374,7 +374,7 @@ namespace Tasks {
|
||||
let result: TaskSystem.CommandConfiguration = {
|
||||
name: value.commandLine,
|
||||
type: TaskSystem.CommandType.Shell,
|
||||
terminalBehavior: TerminalBehaviour.from(value.terminalBehavior)
|
||||
presentation: PresentationOptions.from(value.presentationOptions)
|
||||
};
|
||||
if (value.options) {
|
||||
result.options = CommandOptions.from(value.options);
|
||||
|
||||
@@ -1037,10 +1037,10 @@ export enum TaskRevealKind {
|
||||
Never = 3
|
||||
}
|
||||
|
||||
export enum TaskInstanceKind {
|
||||
export enum TaskPanelKind {
|
||||
Shared = 1,
|
||||
|
||||
Same = 2,
|
||||
Dedicated = 2,
|
||||
|
||||
New = 3
|
||||
}
|
||||
@@ -1053,7 +1053,7 @@ export class BaseTask {
|
||||
private _isBackground: boolean;
|
||||
private _source: string;
|
||||
private _group: string;
|
||||
private _terminalBehavior: vscode.TaskTerminalBehavior;
|
||||
private _presentationOptions: vscode.TaskPresentationOptions;
|
||||
|
||||
constructor(name: string, problemMatchers: string[]) {
|
||||
if (typeof name !== 'string') {
|
||||
@@ -1062,7 +1062,7 @@ export class BaseTask {
|
||||
this._name = name;
|
||||
this._problemMatchers = problemMatchers || [];
|
||||
this._isBackground = false;
|
||||
this._terminalBehavior = Object.create(null);
|
||||
this._presentationOptions = Object.create(null);
|
||||
}
|
||||
|
||||
get identifier(): string {
|
||||
@@ -1124,15 +1124,15 @@ export class BaseTask {
|
||||
this._group = value;
|
||||
}
|
||||
|
||||
get terminalBehavior(): vscode.TaskTerminalBehavior {
|
||||
return this._terminalBehavior;
|
||||
get presentationOptions(): vscode.TaskPresentationOptions {
|
||||
return this._presentationOptions;
|
||||
}
|
||||
|
||||
set terminalBehavior(value: vscode.TaskTerminalBehavior) {
|
||||
set presentationOptions(value: vscode.TaskPresentationOptions) {
|
||||
if (value === void 0 || value === null) {
|
||||
value = Object.create(null);
|
||||
}
|
||||
this._terminalBehavior = value;
|
||||
this._presentationOptions = value;
|
||||
}
|
||||
|
||||
get problemMatchers(): string[] {
|
||||
|
||||
Reference in New Issue
Block a user