mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
Small rename
This commit is contained in:
@@ -162,7 +162,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
|
||||
private readonly _mainThreadExtensionsProxy: MainThreadExtensionServiceShape;
|
||||
|
||||
private readonly _almostReadyToRunExtensions: Barrier;
|
||||
private readonly _barrier: Barrier;
|
||||
private readonly _readyToRunExtensions: Barrier;
|
||||
private readonly _registry: ExtensionDescriptionRegistry;
|
||||
private readonly _storage: ExtHostStorage;
|
||||
private readonly _storagePath: ExtensionStoragePath;
|
||||
@@ -194,7 +194,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
|
||||
this._mainThreadExtensionsProxy = this._extHostContext.getProxy(MainContext.MainThreadExtensionService);
|
||||
|
||||
this._almostReadyToRunExtensions = new Barrier();
|
||||
this._barrier = new Barrier();
|
||||
this._readyToRunExtensions = new Barrier();
|
||||
this._registry = new ExtensionDescriptionRegistry(initData.extensions);
|
||||
this._storage = new ExtHostStorage(this._extHostContext);
|
||||
this._storagePath = new ExtensionStoragePath(initData.workspace, initData.environment);
|
||||
@@ -253,7 +253,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
|
||||
this._almostReadyToRunExtensions.open();
|
||||
|
||||
await this._extHostWorkspace.waitForInitializeCall();
|
||||
this._barrier.open();
|
||||
this._readyToRunExtensions.open();
|
||||
} catch (err) {
|
||||
errors.onUnexpectedError(err);
|
||||
}
|
||||
@@ -276,7 +276,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
|
||||
}
|
||||
|
||||
public isActivated(extensionId: ExtensionIdentifier): boolean {
|
||||
if (this._barrier.isOpen()) {
|
||||
if (this._readyToRunExtensions.isOpen()) {
|
||||
return this._activator.isActivated(extensionId);
|
||||
}
|
||||
return false;
|
||||
@@ -303,11 +303,11 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
|
||||
}
|
||||
|
||||
public getExtensionRegistry(): Promise<ExtensionDescriptionRegistry> {
|
||||
return this._barrier.wait().then(_ => this._registry);
|
||||
return this._readyToRunExtensions.wait().then(_ => this._registry);
|
||||
}
|
||||
|
||||
public getExtensionExports(extensionId: ExtensionIdentifier): IExtensionAPI | null | undefined {
|
||||
if (this._barrier.isOpen()) {
|
||||
if (this._readyToRunExtensions.isOpen()) {
|
||||
return this._activator.getActivatedExtension(extensionId).exports;
|
||||
} else {
|
||||
return null;
|
||||
@@ -332,7 +332,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
|
||||
private _deactivate(extensionId: ExtensionIdentifier): Promise<void> {
|
||||
let result = Promise.resolve(undefined);
|
||||
|
||||
if (!this._barrier.isOpen()) {
|
||||
if (!this._readyToRunExtensions.isOpen()) {
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -661,7 +661,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
|
||||
}
|
||||
this._started = true;
|
||||
|
||||
return this._barrier.wait()
|
||||
return this._readyToRunExtensions.wait()
|
||||
.then(() => this._handleEagerExtensions())
|
||||
.then(() => this._handleExtensionTests())
|
||||
.then(() => {
|
||||
@@ -712,13 +712,13 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
|
||||
|
||||
public $activateByEvent(activationEvent: string): Promise<void> {
|
||||
return (
|
||||
this._barrier.wait()
|
||||
this._readyToRunExtensions.wait()
|
||||
.then(_ => this._activateByEvent(activationEvent, false))
|
||||
);
|
||||
}
|
||||
|
||||
public async $activate(extensionId: ExtensionIdentifier, activationEvent: string): Promise<boolean> {
|
||||
await this._barrier.wait();
|
||||
await this._readyToRunExtensions.wait();
|
||||
if (!this._registry.getExtensionDescription(extensionId)) {
|
||||
// unknown extension => ignore
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user