src/vs/workbench/contrib/preferences/browser/preferencesEditor.ts/PreferencesRenderersController/getPreferencesEditorModel
class PreferencesRenderersController:	private async getPreferencesEditorModel(target: SettingsTarget | undefined): Promise<ISettingsEditorModel | undefined> {
		const resource = target === ConfigurationTarget.USER_LOCAL ? this.preferencesService.userSettingsResource :
			target === ConfigurationTarget.USER_REMOTE ? this.preferencesService.userSettingsResource :
				target === ConfigurationTarget.WORKSPACE ? this.preferencesService.workspaceSettingsResource :
					target;

		if (!resource) {
			return undefined;
		}

		const targetKey = resource.toString();
		if (!this._prefsModelsForSearch.has(targetKey)) {
			try {
				const model = await this.preferencesService.createPreferencesEditorModel(resource);
				if (model) {
					this._register(model);
					this._prefsModelsForSearch.set(targetKey, <ISettingsEditorModel>model);
				}
			} catch (e) {
				// Will throw when the settings file doesn't exist.
				return undefined;
			}
		}

		return this._prefsModelsForSearch.get(targetKey);
	}