Add task detail property and adopt in npm extension

Fixes #69785
This commit is contained in:
Alex Ross
2019-10-22 15:56:21 +02:00
parent ea47d6b95b
commit 87998af618
13 changed files with 1139 additions and 12 deletions

View File

@@ -261,6 +261,7 @@ export namespace TaskDTO {
problemMatchers: value.problemMatchers,
hasDefinedMatchers: (value as types.Task).hasDefinedMatchers,
runOptions: (<vscode.Task>value).runOptions ? (<vscode.Task>value).runOptions : { reevaluateOnRerun: true },
detail: (<vscode.Task2>value).detail
};
return result;
}
@@ -303,6 +304,9 @@ export namespace TaskDTO {
if (value._id) {
result._id = value._id;
}
if (value.detail) {
result.detail = value.detail;
}
return result;
}
}

View File

@@ -1815,6 +1815,7 @@ export class Task implements vscode.Task2 {
private _group: TaskGroup | undefined;
private _presentationOptions: vscode.TaskPresentationOptions;
private _runOptions: vscode.RunOptions;
private _detail: string | undefined;
constructor(definition: vscode.TaskDefinition, name: string, source: string, execution?: ProcessExecution | ShellExecution | CustomExecution, problemMatchers?: string | string[]);
constructor(definition: vscode.TaskDefinition, scope: vscode.TaskScope.Global | vscode.TaskScope.Workspace | vscode.WorkspaceFolder, name: string, source: string, execution?: ProcessExecution | ShellExecution | CustomExecution, problemMatchers?: string | string[]);
@@ -2009,6 +2010,17 @@ export class Task implements vscode.Task2 {
this._group = value;
}
get detail(): string | undefined {
return this._detail;
}
set detail(value: string | undefined) {
if (value === null) {
value = undefined;
}
this._detail = value;
}
get presentationOptions(): vscode.TaskPresentationOptions {
return this._presentationOptions;
}

View File

@@ -89,6 +89,7 @@ export interface TaskDTO {
isBackground?: boolean;
source: TaskSourceDTO;
group?: string;
detail?: string;
presentationOptions?: TaskPresentationOptionsDTO;
problemMatchers: string[];
hasDefinedMatchers: boolean;