Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not clear Task definition or scope unless execution changes #4304

Merged
merged 1 commit into from
Feb 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions packages/plugin-ext/src/plugin/types-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,6 @@ export class Task {
if (value === undefined || value === null) {
throw illegalArgument('Kind can\'t be undefined or null');
}
this.clear();
this.taskDefinition = value;
}

Expand All @@ -1545,7 +1544,6 @@ export class Task {
}

set scope(value: theia.TaskScope.Global | theia.TaskScope.Workspace | theia.WorkspaceFolder | undefined) {
this.clear();
this.taskScope = value;
}

Expand All @@ -1557,7 +1555,6 @@ export class Task {
if (typeof value !== 'string') {
throw illegalArgument('name');
}
this.clear();
this.taskName = value;
}

Expand All @@ -1569,8 +1566,8 @@ export class Task {
if (value === null) {
value = undefined;
}
this.clear();
this.taskExecution = value;
this.updateDefinitionBasedOnExecution();
}

get problemMatchers(): string[] {
Expand All @@ -1583,7 +1580,6 @@ export class Task {
this.hasTaskProblemMatchers = false;
return;
}
this.clear();
this.taskProblemMatchers = value;
this.hasTaskProblemMatchers = true;
}
Expand All @@ -1600,7 +1596,6 @@ export class Task {
if (value !== true && value !== false) {
value = false;
}
this.clear();
this.isTaskBackground = value;
}

Expand All @@ -1612,7 +1607,6 @@ export class Task {
if (typeof value !== 'string' || value.length === 0) {
throw illegalArgument('source must be a string of length > 0');
}
this.clear();
this.taskSource = value;
}

Expand All @@ -1625,7 +1619,6 @@ export class Task {
this.taskGroup = undefined;
return;
}
this.clear();
this.taskGroup = value;
}

Expand All @@ -1637,12 +1630,10 @@ export class Task {
if (value === null) {
value = undefined;
}
this.clear();
this.taskPresentationOptions = value;
}

private clear(): void {
this.taskScope = undefined;
private updateDefinitionBasedOnExecution(): void {
this.taskDefinition = undefined;
if (this.taskExecution instanceof ProcessExecution) {
this.taskDefinition = {
Expand Down