mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 10:38:59 +01:00
ExtensionsRegistry only tracks extension points
This commit is contained in:
@@ -11,7 +11,6 @@ import Severity from 'vs/base/common/severity';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { AbstractExtensionService, ActivatedExtension } from 'vs/platform/extensions/common/abstractExtensionService';
|
||||
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
|
||||
import { ExtensionsRegistry } from 'vs/platform/extensions/common/extensionsRegistry';
|
||||
import { ExtHostStorage } from 'vs/workbench/api/node/extHostStorage';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
|
||||
@@ -119,8 +118,9 @@ export class ExtHostExtensionService extends AbstractExtensionService<ExtHostExt
|
||||
/**
|
||||
* This class is constructed manually because it is a service, so it doesn't use any ctor injection
|
||||
*/
|
||||
constructor(threadService: IThreadService, telemetryService: ITelemetryService, args: { _serviceBrand: any; workspaceStoragePath: string; }) {
|
||||
constructor(availableExtensions: IExtensionDescription[], threadService: IThreadService, telemetryService: ITelemetryService, args: { _serviceBrand: any; workspaceStoragePath: string; }) {
|
||||
super(false);
|
||||
this._registry.registerExtensions(availableExtensions);
|
||||
this._threadService = threadService;
|
||||
this._storage = new ExtHostStorage(threadService);
|
||||
this._proxy = this._threadService.get(MainContext.MainProcessExtensionService);
|
||||
@@ -128,6 +128,14 @@ export class ExtHostExtensionService extends AbstractExtensionService<ExtHostExt
|
||||
this._workspaceStoragePath = args.workspaceStoragePath;
|
||||
}
|
||||
|
||||
public getAllExtensionDescriptions(): IExtensionDescription[] {
|
||||
return this._registry.getAllExtensionDescriptions();
|
||||
}
|
||||
|
||||
public getExtensionDescription(extensionId: string): IExtensionDescription {
|
||||
return this._registry.getExtensionDescription(extensionId);
|
||||
}
|
||||
|
||||
public $localShowMessage(severity: Severity, msg: string): void {
|
||||
switch (severity) {
|
||||
case Severity.Error:
|
||||
@@ -179,7 +187,7 @@ export class ExtHostExtensionService extends AbstractExtensionService<ExtHostExt
|
||||
}
|
||||
|
||||
public registrationDone(): void {
|
||||
this._proxy.$onExtensionHostReady(ExtensionsRegistry.getAllExtensionDescriptions()).then(() => {
|
||||
this._proxy.$onExtensionHostReady(this._registry.getAllExtensionDescriptions()).then(() => {
|
||||
// Wait for the main process to acknowledge its receival of the extensions descriptions
|
||||
// before allowing extensions to be activated
|
||||
this._triggerOnReady();
|
||||
|
||||
Reference in New Issue
Block a user