@@ -15,7 +15,7 @@ import { BetterMergeId } from 'vs/platform/extensionManagement/common/extensionM
1515import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation' ;
1616import { INotificationService , Severity } from 'vs/platform/notification/common/notification' ;
1717import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry' ;
18- import { ActivationTimes , ExtensionPointContribution , IExtensionService , IExtensionsStatus , IMessage , IWillActivateEvent , IResponsiveStateChangeEvent , toExtension , IExtensionHost } from 'vs/workbench/services/extensions/common/extensions' ;
18+ import { ActivationTimes , ExtensionPointContribution , IExtensionService , IExtensionsStatus , IMessage , IWillActivateEvent , IResponsiveStateChangeEvent , toExtension , IExtensionHost , ActivationKind } from 'vs/workbench/services/extensions/common/extensions' ;
1919import { ExtensionMessageCollector , ExtensionPoint , ExtensionsRegistry , IExtensionPoint , IExtensionPointUser } from 'vs/workbench/services/extensions/common/extensionsRegistry' ;
2020import { ExtensionDescriptionRegistry } from 'vs/workbench/services/extensions/common/extensionDescriptionRegistry' ;
2121import { ResponsiveState } from 'vs/workbench/services/extensions/common/rpcProtocol' ;
@@ -186,7 +186,7 @@ export abstract class AbstractExtensionService extends Disposable implements IEx
186186 this . _startExtensionHosts ( false , Array . from ( this . _allRequestedActivateEvents . keys ( ) ) ) ;
187187 }
188188
189- public activateByEvent ( activationEvent : string , eager ?: boolean ) : Promise < void > {
189+ public activateByEvent ( activationEvent : string , activationKind : ActivationKind = ActivationKind . Normal ) : Promise < void > {
190190 if ( this . _installedExtensionsReady . isOpen ( ) ) {
191191 // Extensions have been scanned and interpreted
192192
@@ -198,24 +198,25 @@ export abstract class AbstractExtensionService extends Disposable implements IEx
198198 return NO_OP_VOID_PROMISE ;
199199 }
200200
201- return this . _activateByEvent ( activationEvent ) ;
201+ return this . _activateByEvent ( activationEvent , activationKind ) ;
202202 } else {
203203 // Extensions have not been scanned yet.
204204
205205 // Record the fact that this activationEvent was requested (in case of a restart)
206206 this . _allRequestedActivateEvents . add ( activationEvent ) ;
207207
208- if ( eager ) {
209- return this . _activateByEvent ( activationEvent , eager ) ;
208+ if ( activationKind === ActivationKind . Eager ) {
209+ // Do not wait for the normal start-up of the extension host(s)
210+ return this . _activateByEvent ( activationEvent , activationKind ) ;
210211 }
211212
212- return this . _installedExtensionsReady . wait ( ) . then ( ( ) => this . _activateByEvent ( activationEvent ) ) ;
213+ return this . _installedExtensionsReady . wait ( ) . then ( ( ) => this . _activateByEvent ( activationEvent , activationKind ) ) ;
213214 }
214215 }
215216
216- private _activateByEvent ( activationEvent : string , eager ?: boolean ) : Promise < void > {
217+ private _activateByEvent ( activationEvent : string , activationKind : ActivationKind ) : Promise < void > {
217218 const result = Promise . all (
218- this . _extensionHostManagers . map ( extHostManager => extHostManager . activateByEvent ( activationEvent , eager ) )
219+ this . _extensionHostManagers . map ( extHostManager => extHostManager . activateByEvent ( activationEvent , activationKind ) )
219220 ) . then ( ( ) => { } ) ;
220221 this . _onWillActivateByEvent . fire ( {
221222 event : activationEvent ,
0 commit comments