src/vs/workbench/services/extensions/common/abstractExtensionService.ts/AbstractExtensionService/canAddExtension
class AbstractExtensionService:	public canAddExtension(extension: IExtensionDescription): boolean {
		const existing = this._registry.getExtensionDescription(extension.identifier);
		if (existing) {
			// this extension is already running (most likely at a different version)
			return false;
		}

		// Check if extension is renamed
		if (extension.uuid && this._registry.getAllExtensionDescriptions().some(e => e.uuid === extension.uuid)) {
			return false;
		}

		const extensionKind = this._getExtensionKind(extension);
		const isRemote = extension.extensionLocation.scheme === Schemas.vscodeRemote;
		const extensionHostKind = this._pickExtensionHostKind(extension.identifier, extensionKind, !isRemote, isRemote, ExtensionRunningPreference.None);
		if (extensionHostKind === null) {
			return false;
		}

		return true;
	}