提交 9769d31a 编写于 作者: A Andre Weinand

support var substitution for multiroot workspace

上级 4af9901e
......@@ -69,7 +69,7 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb
}
substituteVariables(folder: IWorkspaceFolder, config: IConfig): TPromise<IConfig> {
return this._proxy.$substituteVariables(folder.uri, config);
return this._proxy.$substituteVariables(folder ? folder.uri : undefined, config);
}
runInTerminal(args: DebugProtocol.RunInTerminalRequestArguments, config: ITerminalSettings): TPromise<void> {
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册