src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts/Extensions/onDidInstallExtension
class Extensions:	private onDidInstallExtension(event: DidInstallExtensionEvent): void {
		const { local, zipPath, error, gallery } = event;
		const installingExtension = gallery ? this.installing.filter(e => areSameExtensions(e.identifier, gallery.identifier))[0] : null;
		this.installing = installingExtension ? this.installing.filter(e => e !== installingExtension) : this.installing;

		let extension: Extension | undefined = installingExtension ? installingExtension
			: (zipPath || local) ? this.instantiationService.createInstance(Extension, this.stateProvider, this.server, local, undefined)
				: undefined;
		if (extension) {
			if (local) {
				const installed = this.installed.filter(e => areSameExtensions(e.identifier, extension!.identifier))[0];
				if (installed) {
					extension = installed;
				} else {
					this.installed.push(extension);
				}
				extension.local = local;
				if (!extension.gallery) {
					extension.gallery = gallery;
				}
				extension.enablementState = this.extensionEnablementService.getEnablementState(local);
			}
		}
		this._onChange.fire(error || !extension ? undefined : { extension, operation: event.operation });
		if (extension && !extension.gallery) {
			this.syncInstalledExtensionWithGallery(extension);
		}
	}