Split up ext host <-> main thread communication to separate files

This commit is contained in:
Alex Dima
2016-06-27 14:58:03 +02:00
parent fa9d70718c
commit d285fe05e1
43 changed files with 2370 additions and 2196 deletions

View File

@@ -0,0 +1,32 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import {IDisposable, dispose} from 'vs/base/common/lifecycle';
import {IThreadService} from 'vs/workbench/services/thread/common/threadService';
import {IConfigurationService} from 'vs/platform/configuration/common/configuration';
import {ExtHostContext} from './extHostProtocol';
import {ExtHostConfiguration} from './extHostConfiguration';
export class MainThreadConfiguration {
private _configurationService: IConfigurationService;
private _toDispose: IDisposable;
private _proxy: ExtHostConfiguration;
constructor(@IConfigurationService configurationService: IConfigurationService,
@IThreadService threadService: IThreadService) {
this._configurationService = configurationService;
this._proxy = threadService.get(ExtHostContext.ExtHostConfiguration);
this._toDispose = this._configurationService.onDidUpdateConfiguration(event => this._proxy.$acceptConfigurationChanged(event.config));
this._proxy.$acceptConfigurationChanged(this._configurationService.getConfiguration());
}
public dispose(): void {
this._toDispose = dispose(this._toDispose);
}
}