Initialize configuration data through ExtHostConfiguration

This commit is contained in:
Alex Dima
2019-01-14 17:04:29 +01:00
parent 57d59ad535
commit 2fe9de8511
16 changed files with 155 additions and 93 deletions

View File

@@ -471,14 +471,15 @@ export class ExtHostTask implements ExtHostTaskShape {
});
}
public $resolveVariables(uriComponents: UriComponents, toResolve: { process?: { name: string; cwd?: string; path?: string }, variables: string[] }): Promise<{ process?: string, variables: { [key: string]: string; } }> {
public async $resolveVariables(uriComponents: UriComponents, toResolve: { process?: { name: string; cwd?: string; path?: string }, variables: string[] }): Promise<{ process?: string, variables: { [key: string]: string; } }> {
const configProvider = await this._configurationService.getConfigProvider();
let uri: URI = URI.revive(uriComponents);
let result = {
process: undefined as string,
variables: Object.create(null)
};
let workspaceFolder = this._workspaceService.resolveWorkspaceFolder(uri);
let resolver = new ExtHostVariableResolverService(this._workspaceService, this._editorService, this._configurationService);
let resolver = new ExtHostVariableResolverService(this._workspaceService, this._editorService, configProvider);
let ws: IWorkspaceFolder = {
uri: workspaceFolder.uri,
name: workspaceFolder.name,
@@ -504,7 +505,7 @@ export class ExtHostTask implements ExtHostTaskShape {
paths
);
}
return Promise.resolve(result);
return result;
}
private nextHandle(): number {