src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.ts/MergeEditorOpenContents/run
class MergeEditorOpenContents:	async run(accessor: ServicesAccessor): Promise<void> {
		const service = accessor.get(IWorkbenchFileService);
		const instaService = accessor.get(IInstantiationService);
		const editorService = accessor.get(IEditorService);
		const inputService = accessor.get(IQuickInputService);
		const clipboardService = accessor.get(IClipboardService);
		const textModelService = accessor.get(ITextModelService);

		const result = await inputService.input({
			prompt: localize('mergeEditor.enterJSON', 'Enter JSON'),
			value: await clipboardService.readText(),
		});
		if (!result) {
			return;
		}

		const content: MergeEditorContents = JSON.parse(result);

		const scheme = 'merge-editor-dev';

		let provider = service.getProvider(scheme) as InMemoryFileSystemProvider | undefined;
		if (!provider) {
			provider = new InMemoryFileSystemProvider();
			service.registerProvider(scheme, provider);
		}

		const baseUri = URI.from({ scheme, path: '/ancestor' });
		const input1Uri = URI.from({ scheme, path: '/input1' });
		const input2Uri = URI.from({ scheme, path: '/input2' });
		const resultUri = URI.from({ scheme, path: '/result' });

		function writeFile(uri: URI, content: string): Promise<void> {
			return provider!.writeFile(uri, VSBuffer.fromString(content).buffer, { create: true, overwrite: true, unlock: true });
		}

		await Promise.all([
			writeFile(baseUri, content.base),
			writeFile(input1Uri, content.input1),
			writeFile(input2Uri, content.input2),
			writeFile(resultUri, content.result),
		]);

		async function setLanguageId(uri: URI, languageId: string): Promise<void> {
			const ref = await textModelService.createModelReference(uri);
			ref.object.textEditorModel.setMode(languageId);
		}

		await Promise.all([
			setLanguageId(baseUri, content.languageId),
			setLanguageId(input1Uri, content.languageId),
			setLanguageId(input2Uri, content.languageId),
			setLanguageId(resultUri, content.languageId),
		]);

		const input = instaService.createInstance(
			MergeEditorInput,
			baseUri,
			{ uri: input1Uri, title: 'Input 1', description: 'Input 1', detail: '(from JSON)' },
			{ uri: input2Uri, title: 'Input 2', description: 'Input 2', detail: '(from JSON)' },
			resultUri,
		);
		editorService.openEditor(input);
	}