Make variable resolving for tasks async

This commit is contained in:
Dirk Baeumer
2018-05-28 08:49:01 +02:00
parent 847828147e
commit 86feb84737
8 changed files with 189 additions and 64 deletions

View File

@@ -491,7 +491,16 @@ export class MainThreadTask implements MainThreadTaskShape {
this._taskService.registerTaskSystem(key, {
platform: platform,
fileSystemScheme: key,
context: this._extHostContext
context: this._extHostContext,
resolveVariables: (workspaceFolder: IWorkspaceFolder, variables: Set<string>): TPromise<Map<string, string>> => {
let vars: string[] = [];
variables.forEach(item => vars.push(item));
return this._proxy.$resolveVariables(workspaceFolder.uri, vars).then(values => {
let result = new Map<string, string>();
Object.keys(values).forEach(key => result.set(key, values[key]));
return result;
});
}
});
}
}