Skip to content

Commit

Permalink
Include task 'label' in the generated task.json
Browse files Browse the repository at this point in the history
Issue:
#8980

Signed-off-by: Alvaro Sanchez-Leon <alvaro.sanchez-leon@ericsson.com>
  • Loading branch information
alvsan09 committed Feb 2, 2021
1 parent 4db1cc8 commit 0463885
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/plugin-ext/src/plugin/type-converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -721,12 +721,10 @@ export function fromTask(task: theia.Task): TaskDto | undefined {
}

const group = task.group;
if (group) {
if (group === TaskGroup.Build) {
taskDto.group = BUILD_GROUP;
} else if (group === TaskGroup.Test) {
taskDto.group = TEST_GROUP;
}
if (group === TaskGroup.Build) {
taskDto.group = BUILD_GROUP;
} else if (group === TaskGroup.Test) {
taskDto.group = TEST_GROUP;
}

const taskDefinition = task.definition;
Expand Down
3 changes: 3 additions & 0 deletions packages/task/src/browser/task-configurations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,9 @@ export class TaskConfigurations implements Disposable {
if (task.group) {
customization.group = task.group;
}

customization.label = task.label;

return { ...customization };
}

Expand Down
1 change: 1 addition & 0 deletions packages/task/src/browser/task-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,7 @@ export class TaskService implements TaskConfigurationClient {
* @param task The task to configure
*/
async configure(token: number, task: TaskConfiguration): Promise<void> {
Object.assign(task, {label: this.taskNameResolver.resolve(task)});
await this.taskConfigurations.configure(token, task);
}

Expand Down

0 comments on commit 0463885

Please sign in to comment.