From d03974b5060406babceba58fb0314f0a42aa8e7c Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 26 Jun 2017 15:04:04 +0200 Subject: [PATCH] multi root: launch and tasks read the master for now --- .../debug/electron-browser/debugConfigurationManager.ts | 6 +++--- .../workbench/parts/debug/electron-browser/debugService.ts | 2 +- .../parts/tasks/electron-browser/task.contribution.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts index 2b432ff7d9e..92b1e62504c 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts @@ -276,7 +276,7 @@ export class ConfigurationManager implements IConfigurationManager { return null; } - const config = this.configurationService.getConfiguration('launch'); + const config = this.configurationService.getConfiguration('launch', { resource: this.contextService.getWorkspace().resource }); if (!config || !config.compounds) { return null; } @@ -285,7 +285,7 @@ export class ConfigurationManager implements IConfigurationManager { } public getConfigurationNames(): string[] { - const config = this.configurationService.getConfiguration('launch'); + const config = this.configurationService.getConfiguration('launch', { resource: this.contextService.getWorkspace().resource }); if (!config || !config.configurations) { return []; } else { @@ -306,7 +306,7 @@ export class ConfigurationManager implements IConfigurationManager { return null; } - const config = this.configurationService.getConfiguration('launch'); + const config = this.configurationService.getConfiguration('launch', { resource: this.contextService.getWorkspace().resource }); if (!config || !config.configurations) { return null; } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 3cee4fabbf4..6c28060b6e4 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -822,7 +822,7 @@ export class DebugService implements debug.IDebugService { watchExpressionsCount: this.model.getWatchExpressions().length, extensionName: `${adapter.extensionDescription.publisher}.${adapter.extensionDescription.name}`, isBuiltin: adapter.extensionDescription.isBuiltin, - launchJsonExists: !!this.configurationService.getConfiguration('launch') + launchJsonExists: this.contextService.getWorkspace() && !!this.configurationService.getConfiguration('launch', { resource: this.contextService.getWorkspace().resource }) }); }).then(() => process, (error: any) => { if (error instanceof Error && error.message === 'Canceled') { diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 5a9f2e16505..8ebc7ed2ad0 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -1277,7 +1277,7 @@ class TaskService extends EventEmitter implements ITaskService { } private getConfiguration(): { config: TaskConfig.ExternalTaskRunnerConfiguration; hasParseErrors: boolean } { - let result = this.configurationService.getConfiguration('tasks'); + let result = this.configurationService.getConfiguration('tasks', { resource: this.contextService.getWorkspace().resource }); if (!result) { return { config: undefined, hasParseErrors: false }; } -- GitLab