src/vs/workbench/services/extensions/common/abstractExtensionService.ts/ExtensionHostKindClassifier/determineExtensionHostKinds
class ExtensionHostKindClassifier:	public static determineExtensionHostKinds(
		_localExtensions: IExtensionDescription[],
		_remoteExtensions: IExtensionDescription[],
		getExtensionKind: (extensionDescription: IExtensionDescription) => ExtensionKind[],
		pickExtensionHostKind: (extensionId: ExtensionIdentifier, extensionKinds: ExtensionKind[], isInstalledLocally: boolean, isInstalledRemotely: boolean, preference: ExtensionRunningPreference) => ExtensionHostKind | null
	): Map<string, ExtensionHostKind | null> {
		const localExtensions = this._toExtensionWithKind(_localExtensions, getExtensionKind);
		const remoteExtensions = this._toExtensionWithKind(_remoteExtensions, getExtensionKind);

		const allExtensions = new Map<string, ExtensionInfo>();
		const collectExtension = (ext: ExtensionWithKind) => {
			if (allExtensions.has(ext.key)) {
				return;
			}
			const local = localExtensions.get(ext.key) || null;
			const remote = remoteExtensions.get(ext.key) || null;
			const info = new ExtensionInfo(local, remote);
			allExtensions.set(info.key, info);
		};
		localExtensions.forEach((ext) => collectExtension(ext));
		remoteExtensions.forEach((ext) => collectExtension(ext));

		const extensionHostKinds = new Map<string, ExtensionHostKind | null>();
		allExtensions.forEach((ext) => {
			const isInstalledLocally = Boolean(ext.local);
			const isInstalledRemotely = Boolean(ext.remote);

			const isLocallyUnderDevelopment = Boolean(ext.local && ext.local.isUnderDevelopment);
			const isRemotelyUnderDevelopment = Boolean(ext.remote && ext.remote.isUnderDevelopment);

			let preference = ExtensionRunningPreference.None;
			if (isLocallyUnderDevelopment && !isRemotelyUnderDevelopment) {
				preference = ExtensionRunningPreference.Local;
			} else if (isRemotelyUnderDevelopment && !isLocallyUnderDevelopment) {
				preference = ExtensionRunningPreference.Remote;
			}

			extensionHostKinds.set(ext.key, pickExtensionHostKind(ext.identifier, ext.kind, isInstalledLocally, isInstalledRemotely, preference));
		});

		return extensionHostKinds;
	}