src/vs/workbench/services/editor/browser/editorOverrideService.ts/EditorOverrideService/populateEditorId
class EditorOverrideService:	async populateEditorId(editor: IUntypedEditorInput): Promise<{ conflictingDefault: boolean } | undefined> {
		let resource = EditorResourceAccessor.getCanonicalUri(editor, { supportSideBySide: SideBySideEditor.PRIMARY });
		// If it was an override before we await for the extensions to activate and then proceed with overriding or else they won't be registered
		if (this.cache && resource && this.resourceMatchesCache(resource)) {
			await this.extensionService.whenInstalledExtensionsRegistered();
		}

		if (resource === undefined) {
			resource = URI.from({ scheme: Schemas.untitled });
		}

		if (editor.options?.override === EditorOverride.DISABLED) {
			throw new Error(`Calling resolve editor override when override is explicitly disabled!`);
		}

		if (editor.options?.override === EditorOverride.PICK) {
			const picked = await this.doPickEditorOverride(editor);
			// If the picker was cancelled we will stop resolving the override
			if (!picked) {
				return undefined;
			}
			// Populate the options with the new ones
			editor.options = picked;
			return { conflictingDefault: false };
		}

		const { editor: selectedEditor, conflictingDefault } = this.getEditor(resource, editor.options?.override);
		editor.options = { ...editor.options, override: selectedEditor?.editorInfo.id };
		return { conflictingDefault };
	}