Add a mechanism to be a customer of the extension host (share lifecycle) and begin reducing usage of IThreadService

This commit is contained in:
Alex Dima
2017-08-15 18:26:35 +02:00
parent 8bad13987d
commit 20a45eef3a
27 changed files with 260 additions and 137 deletions

View File

@@ -5,17 +5,16 @@
'use strict';
import { TPromise } from 'vs/base/common/winjs.base';
import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
import { MainContext, MainThreadLanguagesShape } from './extHost.protocol';
import { MainContext, MainThreadLanguagesShape, IMainContext } from './extHost.protocol';
export class ExtHostLanguages {
private _proxy: MainThreadLanguagesShape;
constructor(
threadService: IThreadService
mainContext: IMainContext
) {
this._proxy = threadService.get(MainContext.MainThreadLanguages);
this._proxy = mainContext.get(MainContext.MainThreadLanguages);
}
getLanguages(): TPromise<string[]> {