提交 f88bbf91 编写于 作者: I isidor

debug: only get workspace to resolve agains for user launch

上级 1287a5dd
......@@ -588,13 +588,17 @@ class Launch implements ILaunch {
// massage configuration attributes - append workspace path to relatvie paths, substitute variables in paths.
Object.keys(result).forEach(key => {
result[key] = this.configurationResolverService.resolveAny(this.workspace, result[key]);
result[key] = this.configurationResolverService.resolveAny(this.getWorkspaceForResolving(), result[key]);
});
const adapter = this.configurationManager.getAdapter(result.type);
return this.configurationResolverService.resolveInteractiveVariables(result, adapter ? adapter.variables : null);
}
protected getWorkspaceForResolving(): IWorkspaceFolder {
return this.workspace;
}
public openConfigFile(sideBySide: boolean, type?: string): TPromise<IEditor> {
const resource = this.uri;
let pinned = false;
......@@ -690,9 +694,9 @@ class UserLaunch extends Launch implements ILaunch {
@IConfigurationService configurationService: IConfigurationService,
@IConfigurationResolverService configurationResolverService: IConfigurationResolverService,
@IPreferencesService private preferencesService: IPreferencesService,
@IWorkspaceContextService contextService: IWorkspaceContextService
@IWorkspaceContextService private contextService: IWorkspaceContextService
) {
super(configurationManager, contextService.getWorkbenchState() === WorkbenchState.FOLDER ? contextService.getWorkspace().folders[0] : undefined, fileService, editorService, configurationService, configurationResolverService);
super(configurationManager, undefined, fileService, editorService, configurationService, configurationResolverService);
}
get uri(): uri {
......@@ -703,6 +707,10 @@ class UserLaunch extends Launch implements ILaunch {
return nls.localize('user settings', "user settings");
}
protected getWorkspaceForResolving(): IWorkspaceFolder {
return this.contextService.getWorkbenchState() === WorkbenchState.FOLDER ? this.contextService.getWorkspace().folders[0] : undefined;
}
public get hidden(): boolean {
return true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册