mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 00:28:52 +01:00
Rename to DocumentOnDropEditProvider (#149730)
This change renames `DocumentOnDropProvider` to `DocumentOnDropEditProvider`. This new name aligns with the existing `DocumentFormattingEditProvider`
This commit is contained in:
@@ -1745,12 +1745,12 @@ class TypeHierarchyAdapter {
|
||||
}
|
||||
}
|
||||
|
||||
class DocumentOnDropAdapter {
|
||||
class DocumentOnDropEditAdapter {
|
||||
|
||||
constructor(
|
||||
private readonly _proxy: extHostProtocol.MainThreadLanguageFeaturesShape,
|
||||
private readonly _documents: ExtHostDocuments,
|
||||
private readonly _provider: vscode.DocumentOnDropProvider,
|
||||
private readonly _provider: vscode.DocumentOnDropEditProvider,
|
||||
private readonly _handle: number,
|
||||
) { }
|
||||
|
||||
@@ -1778,7 +1778,7 @@ type Adapter = DocumentSymbolAdapter | CodeLensAdapter | DefinitionAdapter | Hov
|
||||
| DocumentSemanticTokensAdapter | DocumentRangeSemanticTokensAdapter
|
||||
| EvaluatableExpressionAdapter | InlineValuesAdapter
|
||||
| LinkedEditingRangeAdapter | InlayHintsAdapter | InlineCompletionAdapter | InlineCompletionAdapterNew
|
||||
| DocumentOnDropAdapter;
|
||||
| DocumentOnDropEditAdapter;
|
||||
|
||||
class AdapterData {
|
||||
constructor(
|
||||
@@ -2402,15 +2402,15 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
|
||||
// --- Document on drop
|
||||
|
||||
registerDocumentOnDropProvider(extension: IExtensionDescription, selector: vscode.DocumentSelector, provider: vscode.DocumentOnDropProvider) {
|
||||
registerDocumentOnDropEditProvider(extension: IExtensionDescription, selector: vscode.DocumentSelector, provider: vscode.DocumentOnDropEditProvider) {
|
||||
const handle = this._nextHandle();
|
||||
this._adapter.set(handle, new AdapterData(new DocumentOnDropAdapter(this._proxy, this._documents, provider, handle), extension));
|
||||
this._proxy.$registerDocumentOnDropProvider(handle, this._transformDocumentSelector(selector));
|
||||
this._adapter.set(handle, new AdapterData(new DocumentOnDropEditAdapter(this._proxy, this._documents, provider, handle), extension));
|
||||
this._proxy.$registerDocumentOnDropEditProvider(handle, this._transformDocumentSelector(selector));
|
||||
return this._createDisposable(handle);
|
||||
}
|
||||
|
||||
$provideDocumentOnDropEdits(handle: number, requestId: number, resource: UriComponents, position: IPosition, dataTransferDto: DataTransferDTO, token: CancellationToken): Promise<Dto<languages.SnippetTextEdit> | undefined> {
|
||||
return this._withAdapter(handle, DocumentOnDropAdapter, adapter =>
|
||||
return this._withAdapter(handle, DocumentOnDropEditAdapter, adapter =>
|
||||
Promise.resolve(adapter.provideDocumentOnDropEdits(requestId, URI.revive(resource), position, dataTransferDto, token)), undefined, undefined);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user