src/vs/workbench/contrib/extensions/browser/extensionsActions.ts/AbstractInstallAction/run
class AbstractInstallAction:	override async run(): Promise<any> {
		if (!this.extension) {
			return;
		}

		if (this.extension.deprecationInfo) {
			let detail = localize('deprecated message', "This extension is deprecated as it is no longer being maintained.");
			let action: () => Promise<any> = async () => undefined;
			const buttons = [
				localize('install anyway', "Install Anyway"),
				localize('cancel', "Cancel"),
			];

			if (this.extension.deprecationInfo.extension) {
				detail = localize('deprecated with alternate extension message', "This extension is deprecated. Use the {0} extension instead.", this.extension.deprecationInfo.extension.displayName);
				buttons.splice(1, 0, localize('Show alternate extension', "Open {0}", this.extension.deprecationInfo.extension.displayName));
				const alternateExtension = this.extension.deprecationInfo.extension;
				action = () => this.extensionsWorkbenchService.getExtensions([{ id: alternateExtension.id, preRelease: alternateExtension.preRelease }], CancellationToken.None)
					.then(([extension]) => this.extensionsWorkbenchService.open(extension));
			} else if (this.extension.deprecationInfo.settings) {
				detail = localize('deprecated with alternate settings message', "This extension is deprecated as this functionality is now built-in to VS Code.");
				buttons.splice(1, 0, localize('configure in settings', "Configure Settings"));
				const settings = this.extension.deprecationInfo.settings;
				action = () => this.preferencesService.openSettings({ query: settings.map(setting => `@id:${setting}`).join(' ') });
			}

			const result = await this.dialogService.show(
				Severity.Warning,
				localize('install confirmation', "Are you sure you want to install '{0}'?", this.extension.displayName),
				buttons,
				{ detail, cancelId: buttons.length - 1 });
			if (result.choice === 1) {
				return action();
			}
			if (result.choice === 2) {
				return;
			}
		}

		this.extensionsWorkbenchService.open(this.extension, { showPreReleaseVersion: this.installPreReleaseVersion });

		alert(localize('installExtensionStart', "Installing extension {0} started. An editor is now open with more details on this extension", this.extension.displayName));

		const extension = await this.install(this.extension);

		if (extension?.local) {
			alert(localize('installExtensionComplete', "Installing extension {0} is completed.", this.extension.displayName));
			const runningExtension = await this.getRunningExtension(extension.local);
			if (runningExtension && !(runningExtension.activationEvents && runningExtension.activationEvents.some(activationEent => activationEent.startsWith('onLanguage')))) {
				const action = await this.getThemeAction(extension);
				if (action) {
					action.extension = extension;
					try {
						return action.run({ showCurrentTheme: true, ignoreFocusLost: true });
					} finally {
						action.dispose();
					}
				}
			}
		}

	}