Fixes #14500: wait for extension points

* Use the extension descriptions available in the UI thread
* Don't wait for handling extension points until extension host is running
* Create the extension host process only after extension points have been handled
* Send the initial configuration as part of the initData to the extension host
This commit is contained in:
Alex Dima
2016-10-26 22:02:47 +02:00
parent d801542057
commit 6dd7a04bbd
11 changed files with 39 additions and 52 deletions

View File

@@ -5,7 +5,6 @@
'use strict';
import { mixin } from 'vs/base/common/objects';
import { illegalState } from 'vs/base/common/errors';
import Event, { Emitter } from 'vs/base/common/event';
import { WorkspaceConfiguration } from 'vscode';
import { ExtHostConfigurationShape, MainThreadConfigurationShape } from './extHost.protocol';
@@ -14,13 +13,13 @@ import { ConfigurationTarget } from 'vs/workbench/services/configuration/common/
export class ExtHostConfiguration extends ExtHostConfigurationShape {
private _proxy: MainThreadConfigurationShape;
private _hasConfig: boolean;
private _config: any;
private _onDidChangeConfiguration = new Emitter<void>();
constructor(proxy: MainThreadConfigurationShape) {
constructor(proxy: MainThreadConfigurationShape, configuration: any) {
super();
this._proxy = proxy;
this._config = configuration;
}
get onDidChangeConfiguration(): Event<void> {
@@ -29,14 +28,10 @@ export class ExtHostConfiguration extends ExtHostConfigurationShape {
public $acceptConfigurationChanged(config: any) {
this._config = config;
this._hasConfig = true;
this._onDidChangeConfiguration.fire(undefined);
}
public getConfiguration(section?: string): WorkspaceConfiguration {
if (!this._hasConfig) {
throw illegalState('missing config');
}
const config = section
? ExtHostConfiguration._lookUp(section, this._config)