src/vs/workbench/contrib/dropIntoEditor/browser/dropIntoEditor.contibution.ts/DropIntoEditorController/onDropIntoEditor
class DropIntoEditorController:	private async onDropIntoEditor(editor: ICodeEditor, position: IPosition, dragEvent: DragEvent) {
		if (!dragEvent.dataTransfer || !editor.hasModel()) {
			return;
		}

		const model = editor.getModel();
		const modelVersionNow = model.getVersionId();

		const textEditorDataTransfer: IDataTransfer = new Map<string, IDataTransferItem>();
		for (const item of dragEvent.dataTransfer.items) {
			if (item.kind === 'string') {
				const type = item.type;
				const asStringValue = new Promise<string>(resolve => item.getAsString(resolve));
				textEditorDataTransfer.set(type, {
					asString: () => asStringValue,
					value: undefined
				});
			}
		}

		if (!textEditorDataTransfer.has(Mimes.uriList.toLowerCase())) {
			const editorData = (await this._instantiationService.invokeFunction(extractEditorsDropData, dragEvent))
				.filter(input => input.resource)
				.map(input => input.resource!.toString());

			if (editorData.length) {
				const str = distinct(editorData).join('\n');
				textEditorDataTransfer.set(Mimes.uriList.toLowerCase(), {
					asString: () => Promise.resolve(str),
					value: undefined
				});
			}
		}

		if (textEditorDataTransfer.size === 0) {
			return;
		}

		if (editor.getModel().getVersionId() !== modelVersionNow) {
			return;
		}

		const cts = new CancellationTokenSource();
		editor.onDidDispose(() => cts.cancel());
		model.onDidChangeContent(() => cts.cancel());

		const ordered = this._languageFeaturesService.documentOnDropEditProvider.ordered(model);
		for (const provider of ordered) {
			const edit = await provider.provideDocumentOnDropEdits(model, position, textEditorDataTransfer, cts.token);
			if (cts.token.isCancellationRequested || editor.getModel().getVersionId() !== modelVersionNow) {
				return;
			}

			if (edit) {
				performSnippetEdit(editor, edit);
				return;
			}
		}

		return this.doDefaultDrop(editor, position, textEditorDataTransfer, cts.token);
	}