mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
@@ -784,6 +784,7 @@ export function createApiFactory(
|
||||
QuickInputButtons: extHostTypes.QuickInputButtons,
|
||||
Range: extHostTypes.Range,
|
||||
RelativePattern: extHostTypes.RelativePattern,
|
||||
RerunBehavior: extHostTypes.RerunBehavior,
|
||||
Selection: extHostTypes.Selection,
|
||||
ShellExecution: extHostTypes.ShellExecution,
|
||||
ShellQuoting: extHostTypes.ShellQuoting,
|
||||
@@ -797,6 +798,7 @@ export function createApiFactory(
|
||||
SymbolInformation: extHostTypes.SymbolInformation,
|
||||
SymbolKind: extHostTypes.SymbolKind,
|
||||
Task: extHostTypes.Task,
|
||||
Task2: extHostTypes.Task,
|
||||
TaskGroup: extHostTypes.TaskGroup,
|
||||
TaskPanelKind: extHostTypes.TaskPanelKind,
|
||||
TaskRevealKind: extHostTypes.TaskRevealKind,
|
||||
|
||||
@@ -403,7 +403,8 @@ namespace Tasks {
|
||||
command: command,
|
||||
isBackground: !!task.isBackground,
|
||||
problemMatchers: task.problemMatchers.slice(),
|
||||
hasDefinedMatchers: (task as types.Task).hasDefinedMatchers
|
||||
hasDefinedMatchers: (task as types.Task).hasDefinedMatchers,
|
||||
runOptions: (<vscode.Task2>task).runOptions ? (<vscode.Task2>task).runOptions : { rerunBehavior: tasks.RerunBehavior.reevaluate },
|
||||
};
|
||||
return result;
|
||||
}
|
||||
@@ -629,7 +630,8 @@ namespace TaskDTO {
|
||||
group: group,
|
||||
presentationOptions: TaskPresentationOptionsDTO.from(value.presentationOptions),
|
||||
problemMatchers: value.problemMatchers,
|
||||
hasDefinedMatchers: (value as types.Task).hasDefinedMatchers
|
||||
hasDefinedMatchers: (value as types.Task).hasDefinedMatchers,
|
||||
runOptions: (<vscode.Task2>value).runOptions ? (<vscode.Task2>value).runOptions : { rerunBehavior: tasks.RerunBehavior.reevaluate },
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1591,7 +1591,12 @@ export enum TaskScope {
|
||||
Workspace = 2
|
||||
}
|
||||
|
||||
export class Task implements vscode.Task {
|
||||
export enum RerunBehavior {
|
||||
reevaluate = 1,
|
||||
useEvaluated = 2,
|
||||
}
|
||||
|
||||
export class Task implements vscode.Task2 {
|
||||
|
||||
private __id: string;
|
||||
|
||||
@@ -1605,6 +1610,7 @@ export class Task implements vscode.Task {
|
||||
private _source: string;
|
||||
private _group: TaskGroup;
|
||||
private _presentationOptions: vscode.TaskPresentationOptions;
|
||||
private _runOptions: vscode.RunOptions;
|
||||
|
||||
constructor(definition: vscode.TaskDefinition, name: string, source: string, execution?: ProcessExecution | ShellExecution, problemMatchers?: string | string[]);
|
||||
constructor(definition: vscode.TaskDefinition, scope: vscode.TaskScope.Global | vscode.TaskScope.Workspace | vscode.WorkspaceFolder, name: string, source: string, execution?: ProcessExecution | ShellExecution, problemMatchers?: string | string[]);
|
||||
@@ -1782,6 +1788,18 @@ export class Task implements vscode.Task {
|
||||
this.clear();
|
||||
this._presentationOptions = value;
|
||||
}
|
||||
|
||||
get runOptions(): vscode.RunOptions {
|
||||
return this._runOptions;
|
||||
}
|
||||
|
||||
set runOptions(value: vscode.RunOptions) {
|
||||
if (value === null) {
|
||||
value = undefined;
|
||||
}
|
||||
this.clear();
|
||||
this._runOptions = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user