Merge from vscode 0a7364f00514c46c9caceece15e1f82f82e3712f

This commit is contained in:
ADS Merger
2020-07-22 03:06:57 +00:00
parent 53ec7585a9
commit 1b7b54ce14
229 changed files with 5099 additions and 3188 deletions

View File

@@ -334,7 +334,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
this.setExecutionContexts();
}
protected setExecutionContexts(custom: boolean = true, shell: boolean = false, process: boolean = false): void {
protected setExecutionContexts(custom: boolean = true, shell: boolean = true, process: boolean = true): void {
const customContext = CustomExecutionSupportedContext.bindTo(this.contextKeyService);
customContext.set(custom);
const shellContext = ShellExecutionSupportedContext.bindTo(this.contextKeyService);
@@ -530,6 +530,9 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
}
public registerTaskSystem(key: string, info: TaskSystemInfo): void {
if (info.platform === Platform.Platform.Web) {
this.setExecutionContexts(true, false, false);
}
this._taskSystemInfos.set(key, info);
}
@@ -1584,7 +1587,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
private isTaskProviderEnabled(type: string) {
const definition = TaskDefinitionRegistry.get(type);
return !definition.when || this.contextKeyService.contextMatchesRules(definition.when);
return !definition || !definition.when || this.contextKeyService.contextMatchesRules(definition.when);
}
private getGroupedTasks(type?: string): Promise<TaskMap> {