src/vs/workbench/contrib/customEditor/browser/customEditorInput.ts/CustomEditorInput/create
class CustomEditorInput:	static create(
		instantiationService: IInstantiationService,
		resource: URI,
		viewType: string,
		group: GroupIdentifier | undefined,
		options?: { readonly customClasses?: string, readonly oldResource?: URI },
	): IEditorInput {
		return instantiationService.invokeFunction(accessor => {
			if (viewType === defaultCustomEditor.id) {
				return accessor.get(IEditorService).createEditorInput({ resource, forceFile: true });
			}
			// If it's an untitled file we must populate the untitledDocumentData
			const untitledString = accessor.get(IUntitledTextEditorService).getValue(resource);
			let untitledDocumentData = untitledString ? VSBuffer.fromString(untitledString) : undefined;
			const id = generateUuid();
			const webview = accessor.get(IWebviewService).createWebviewOverlay(id, { customClasses: options?.customClasses }, {}, undefined);
			const input = instantiationService.createInstance(CustomEditorInput, resource, viewType, id, webview, { untitledDocumentData: untitledDocumentData, oldResource: options?.oldResource });
			if (typeof group !== 'undefined') {
				input.updateGroup(group);
			}
			return input;
		});
	}