src/vs/editor/contrib/dropIntoEditor/browser/dropIntoEditorContribution.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 initialModelVersion = model.getVersionId();

		const ourDataTransfer = await this.extractDataTransferData(dragEvent);
		if (ourDataTransfer.size === 0) {
			return;
		}

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

		const tokenSource = new EditorStateCancellationTokenSource(editor, CodeEditorStateFlag.Value);
		try {
			const providers = this._languageFeaturesService.documentOnDropEditProvider.ordered(model);

			const providerEdit = await this._progressService.withProgress({
				location: ProgressLocation.Notification,
				delay: 750,
				title: localize('dropProgressTitle', "Running drop handlers..."),
				cancellable: true,
			}, () => {
				return raceCancellation((async () => {
					for (const provider of providers) {
						const edit = await provider.provideDocumentOnDropEdits(model, position, ourDataTransfer, tokenSource.token);
						if (tokenSource.token.isCancellationRequested) {
							return undefined;
						}
						if (edit) {
							return edit;
						}
					}
					return undefined;
				})(), tokenSource.token);
			}, () => {
				tokenSource.cancel();
			});

			if (tokenSource.token.isCancellationRequested || editor.getModel().getVersionId() !== initialModelVersion) {
				return;
			}

			if (providerEdit) {
				const snippet = typeof providerEdit.insertText === 'string' ? SnippetParser.escape(providerEdit.insertText) : providerEdit.insertText.snippet;
				const combinedWorkspaceEdit: WorkspaceEdit = {
					edits: [
						new ResourceTextEdit(model.uri, {
							range: new Range(position.lineNumber, position.column, position.lineNumber, position.column),
							text: snippet,
							insertAsSnippet: true,
						}),
						...(providerEdit.additionalEdit?.edits ?? [])
					]
				};
				await this._bulkEditService.apply(combinedWorkspaceEdit, { editor });
				return;
			}
		} finally {
			tokenSource.dispose();
		}
	}