mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
Split up ext host <-> main thread communication to separate files
This commit is contained in:
@@ -6,12 +6,8 @@
|
||||
|
||||
import {clone} from 'vs/base/common/objects';
|
||||
import {illegalState} from 'vs/base/common/errors';
|
||||
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 Event, {Emitter} from 'vs/base/common/event';
|
||||
import {WorkspaceConfiguration} from 'vscode';
|
||||
import {ExtHostContext} from './extHostProtocol';
|
||||
|
||||
export class ExtHostConfiguration {
|
||||
|
||||
@@ -76,24 +72,3 @@ export class ExtHostConfiguration {
|
||||
return node;
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user