support var substitution for multiroot workspace

This commit is contained in:
Andre Weinand
2018-06-27 22:52:36 +02:00
parent 4af9901e41
commit 9769d31a39
2 changed files with 13 additions and 10 deletions

View File

@@ -166,15 +166,18 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape {
if (!this._variableResolver) {
this._variableResolver = new ExtHostVariableResolverService(this._workspaceService, this._editorsService, this._configurationService);
}
let ws: IWorkspaceFolder;
const folder = this.getFolder(folderUri);
let ws: IWorkspaceFolder = {
uri: folder.uri,
name: folder.name,
index: folder.index,
toResource: () => {
throw new Error('Not implemented');
}
};
if (folder) {
ws = {
uri: folder.uri,
name: folder.name,
index: folder.index,
toResource: () => {
throw new Error('Not implemented');
}
};
}
return asWinJsPromise(token => this._variableResolver.resolveAny(ws, config));
}
@@ -524,7 +527,7 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape {
this._onDidReceiveDebugSessionCustomEvent.fire(ee);
}
private getFolder(_folderUri: UriComponents | undefined): vscode.WorkspaceFolder {
private getFolder(_folderUri: UriComponents | undefined): vscode.WorkspaceFolder | undefined {
if (_folderUri) {
const folderURI = URI.revive(_folderUri);
return this._workspaceService.resolveWorkspaceFolder(folderURI);