start with a step back and use IWorkspace where needed, nuke workspace context service from ext host, #28526

This commit is contained in:
Johannes Rieken
2017-06-12 15:39:39 +02:00
parent def13c6d78
commit 7c1c21c158
5 changed files with 21 additions and 40 deletions

View File

@@ -41,7 +41,6 @@ import EditorCommon = require('vs/editor/common/editorCommon');
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
import { ExtHostExtensionService } from 'vs/workbench/api/node/extHostExtensionService';
import { TPromise } from 'vs/base/common/winjs.base';
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { CancellationTokenSource } from 'vs/base/common/cancellation';
import * as vscode from 'vscode';
@@ -72,7 +71,6 @@ export function createApiFactory(
initData: IInitData,
threadService: IThreadService,
extensionService: ExtHostExtensionService,
contextService: IWorkspaceContextService,
telemetryService: ITelemetryService
): IExtensionApiFactory {
@@ -101,7 +99,7 @@ export function createApiFactory(
const extHostStatusBar = new ExtHostStatusBar(threadService);
const extHostProgress = new ExtHostProgress(threadService.get(MainContext.MainThreadProgress));
const extHostOutputService = new ExtHostOutputService(threadService);
const workspacePath = contextService.hasWorkspace() ? contextService.getWorkspace().resource.fsPath : undefined;
const workspacePath = initData.workspace ? initData.workspace.resource.fsPath : undefined;
const extHostWorkspace = new ExtHostWorkspace(threadService, workspacePath);
const extHostLanguages = new ExtHostLanguages(threadService);