diff --git a/src/vs/workbench/parts/debug/node/debugConfigurationManager.ts b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts similarity index 99% rename from src/vs/workbench/parts/debug/node/debugConfigurationManager.ts rename to src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts index 7190ecb713a2480f0a37d42a9b8cd569bbd732e6..82e7a45da4818072b9991127596bfc90baf5977a 100644 --- a/src/vs/workbench/parts/debug/node/debugConfigurationManager.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts @@ -29,7 +29,7 @@ import {Adapter} from 'vs/workbench/parts/debug/node/debugAdapter'; import {IWorkspaceContextService} from 'vs/workbench/services/workspace/common/contextService'; import {IWorkbenchEditorService} from 'vs/workbench/services/editor/common/editorService'; import {IQuickOpenService} from 'vs/workbench/services/quickopen/common/quickOpenService'; -import {ConfigVariables} from 'vs/workbench/parts/lib/node/configVariables'; +import {ConfigVariables} from 'vs/workbench/parts/lib/electron-browser/configVariables'; import {ISystemVariables} from 'vs/base/common/parsers'; // debuggers extension point diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 6e1dd81fc0e359d53a87195d6ae8dee16bdcdbed..8901ca8ba5580029d667ae6811eb9ffd49e4167b 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -37,7 +37,7 @@ import model = require('vs/workbench/parts/debug/common/debugModel'); import {DebugStringEditorInput} from 'vs/workbench/parts/debug/browser/debugEditorInputs'; import viewmodel = require('vs/workbench/parts/debug/common/debugViewModel'); import debugactions = require('vs/workbench/parts/debug/browser/debugActions'); -import {ConfigurationManager} from 'vs/workbench/parts/debug/node/debugConfigurationManager'; +import {ConfigurationManager} from 'vs/workbench/parts/debug/electron-browser/debugConfigurationManager'; import {Source} from 'vs/workbench/parts/debug/common/debugSource'; import {ITaskService, TaskEvent, TaskType, TaskServiceEvents, ITaskSummary} from 'vs/workbench/parts/tasks/common/taskService'; import {TaskError, TaskErrors} from 'vs/workbench/parts/tasks/common/taskSystem'; diff --git a/src/vs/workbench/parts/lib/node/configVariables.ts b/src/vs/workbench/parts/lib/electron-browser/configVariables.ts similarity index 100% rename from src/vs/workbench/parts/lib/node/configVariables.ts rename to src/vs/workbench/parts/lib/electron-browser/configVariables.ts diff --git a/src/vs/workbench/parts/lib/node/systemVariables.ts b/src/vs/workbench/parts/lib/electron-browser/systemVariables.ts similarity index 89% rename from src/vs/workbench/parts/lib/node/systemVariables.ts rename to src/vs/workbench/parts/lib/electron-browser/systemVariables.ts index cf0c926eae2db0b2ddb28d2589c7484053c0dc70..6b1ceb01e7331fafff922113a7f0b91c942a1202 100644 --- a/src/vs/workbench/parts/lib/node/systemVariables.ts +++ b/src/vs/workbench/parts/lib/electron-browser/systemVariables.ts @@ -13,19 +13,26 @@ import * as WorkbenchEditorCommon from 'vs/workbench/common/editor'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IWorkspaceContextService } from 'vs/workbench/services/workspace/common/contextService'; +import { remote } from 'electron'; + export class SystemVariables extends AbstractSystemVariables { private _workspaceRoot: string; private _execPath: string; // Optional workspaceRoot there to be used in tests. - constructor(private editorService: IWorkbenchEditorService, contextService: IWorkspaceContextService, workspaceRoot: URI = null, envVariables: { [key: string]: string } = process.env) { + constructor( + private editorService: IWorkbenchEditorService, + contextService: IWorkspaceContextService, + workspaceRoot: URI = null, + envVariables: { [key: string]: string } = process.env + ) { super(); let fsPath = ''; if (workspaceRoot || (contextService && contextService.getWorkspace())) { fsPath = workspaceRoot ? workspaceRoot.fsPath : contextService.getWorkspace().resource.fsPath; } this._workspaceRoot = Paths.normalize(fsPath, true); - this._execPath = contextService ? contextService.getConfiguration().env.execPath : null; + this._execPath = remote.process.execPath; Object.keys(envVariables).forEach(key => { this[`env.${key}`] = envVariables[key]; }); diff --git a/src/vs/workbench/parts/lib/test/node/configVariables.test.ts b/src/vs/workbench/parts/lib/test/electron-browser/configVariables.test.ts similarity index 98% rename from src/vs/workbench/parts/lib/test/node/configVariables.test.ts rename to src/vs/workbench/parts/lib/test/electron-browser/configVariables.test.ts index 8db9034d64e4b8f90ac031d1a55864e9d4f8c94e..426566d9e6d1d4eceb86cd66e2d463d512c0ea7b 100644 --- a/src/vs/workbench/parts/lib/test/node/configVariables.test.ts +++ b/src/vs/workbench/parts/lib/test/electron-browser/configVariables.test.ts @@ -7,7 +7,7 @@ import * as assert from 'assert'; import URI from 'vs/base/common/uri'; import * as Platform from 'vs/base/common/platform'; -import { ConfigVariables } from 'vs/workbench/parts/lib/node/configVariables'; +import { ConfigVariables } from 'vs/workbench/parts/lib/electron-browser/configVariables'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import {TPromise} from 'vs/base/common/winjs.base'; diff --git a/src/vs/workbench/parts/lib/test/node/systemVariables.test.ts b/src/vs/workbench/parts/lib/test/electron-browser/systemVariables.test.ts similarity index 96% rename from src/vs/workbench/parts/lib/test/node/systemVariables.test.ts rename to src/vs/workbench/parts/lib/test/electron-browser/systemVariables.test.ts index 859beef79693219ab98b94c6123c3784e695df29..fe02628c5d240e8b7196c8a5bfa79fd00b70a253 100644 --- a/src/vs/workbench/parts/lib/test/node/systemVariables.test.ts +++ b/src/vs/workbench/parts/lib/test/electron-browser/systemVariables.test.ts @@ -8,7 +8,7 @@ import * as assert from 'assert'; import URI from 'vs/base/common/uri'; import * as Platform from 'vs/base/common/platform'; -import { SystemVariables } from 'vs/workbench/parts/lib/node/systemVariables'; +import { SystemVariables } from 'vs/workbench/parts/lib/electron-browser/systemVariables'; suite('SystemVariables tests', () => { test('SystemVariables: substitute one', () => { diff --git a/src/vs/workbench/parts/tasks/node/processRunnerConfiguration.ts b/src/vs/workbench/parts/tasks/electron-browser/processRunnerConfiguration.ts similarity index 100% rename from src/vs/workbench/parts/tasks/node/processRunnerConfiguration.ts rename to src/vs/workbench/parts/tasks/electron-browser/processRunnerConfiguration.ts diff --git a/src/vs/workbench/parts/tasks/node/processRunnerDetector.ts b/src/vs/workbench/parts/tasks/electron-browser/processRunnerDetector.ts similarity index 99% rename from src/vs/workbench/parts/tasks/node/processRunnerDetector.ts rename to src/vs/workbench/parts/tasks/electron-browser/processRunnerDetector.ts index 65b0bebe92dc14fa7d400bc82e17c2a4594a121d..92bc732878a6f3bc8ff8baad120eec17a7180ecb 100644 --- a/src/vs/workbench/parts/tasks/node/processRunnerDetector.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/processRunnerDetector.ts @@ -14,7 +14,7 @@ import { LineProcess } from 'vs/base/node/processes'; import { IFileService } from 'vs/platform/files/common/files'; -import { SystemVariables } from 'vs/workbench/parts/lib/node/systemVariables'; +import { SystemVariables } from 'vs/workbench/parts/lib/electron-browser/systemVariables'; import { IWorkspaceContextService } from 'vs/workbench/services/workspace/common/contextService'; import * as FileConfig from './processRunnerConfiguration'; diff --git a/src/vs/workbench/parts/tasks/node/processRunnerSystem.ts b/src/vs/workbench/parts/tasks/electron-browser/processRunnerSystem.ts similarity index 100% rename from src/vs/workbench/parts/tasks/node/processRunnerSystem.ts rename to src/vs/workbench/parts/tasks/electron-browser/processRunnerSystem.ts 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 f2879355a87bdcd0ce9da90d59179d0828b08f95..37caab456a4b44dca7fb5b3be113fb8dae3ee652 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -56,7 +56,7 @@ import { IPartService } from 'vs/workbench/services/part/common/partService'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IWorkspaceContextService } from 'vs/workbench/services/workspace/common/contextService'; -import { ConfigVariables } from 'vs/workbench/parts/lib/node/configVariables'; +import { ConfigVariables } from 'vs/workbench/parts/lib/electron-browser/configVariables'; import { ITextFileService, EventType } from 'vs/workbench/parts/files/common/files'; import { IOutputService, IOutputChannelRegistry, Extensions as OutputExt, IOutputChannel } from 'vs/workbench/parts/output/common/output'; @@ -65,9 +65,9 @@ import { ITaskService, TaskServiceEvents } from 'vs/workbench/parts/tasks/common import { templates as taskTemplates } from 'vs/workbench/parts/tasks/common/taskTemplates'; import { LanguageServiceTaskSystem, LanguageServiceTaskConfiguration } from 'vs/workbench/parts/tasks/common/languageServiceTaskSystem'; -import * as FileConfig from 'vs/workbench/parts/tasks/node/processRunnerConfiguration'; -import { ProcessRunnerSystem } from 'vs/workbench/parts/tasks/node/processRunnerSystem'; -import { ProcessRunnerDetector } from 'vs/workbench/parts/tasks/node/processRunnerDetector'; +import * as FileConfig from 'vs/workbench/parts/tasks/electron-browser/processRunnerConfiguration'; +import { ProcessRunnerSystem } from 'vs/workbench/parts/tasks/electron-browser/processRunnerSystem'; +import { ProcessRunnerDetector } from 'vs/workbench/parts/tasks/electron-browser/processRunnerDetector'; let $ = Builder.$; diff --git a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts b/src/vs/workbench/parts/tasks/test/electron-browser/configuration.test.ts similarity index 99% rename from src/vs/workbench/parts/tasks/test/node/configuration.test.ts rename to src/vs/workbench/parts/tasks/test/electron-browser/configuration.test.ts index b98a68d7cb627cdcfd879a106db7d92ff4c6a0c3..eabcaa72275d063667fe0e9397db6a122c2fe1ce 100644 --- a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts +++ b/src/vs/workbench/parts/tasks/test/electron-browser/configuration.test.ts @@ -11,7 +11,7 @@ import * as Platform from 'vs/base/common/platform'; import { ProblemMatcher, FileLocationKind, ProblemPattern, ApplyToKind } from 'vs/platform/markers/common/problemMatcher'; import * as TaskSystem from 'vs/workbench/parts/tasks/common/taskSystem'; -import { parse, ParseResult, ILogger, ExternalTaskRunnerConfiguration } from 'vs/workbench/parts/tasks/node/processRunnerConfiguration'; +import { parse, ParseResult, ILogger, ExternalTaskRunnerConfiguration } from 'vs/workbench/parts/tasks/electron-browser/processRunnerConfiguration'; class Logger implements ILogger { public receivedMessage: boolean = false;