Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 1 addition & 42 deletions packages/plugin/src/theia.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14528,6 +14528,7 @@ export module '@theia/plugin' {
*
* @returns The resolved edit or a thenable that resolves to such. It is OK to return the given
* `edit`. If no result is returned, the given `edit` is used.
* @stubbed
*/
resolveDocumentDropEdit?(edit: T, token: CancellationToken): ProviderResult<T>;
}
Expand Down Expand Up @@ -14728,48 +14729,6 @@ export module '@theia/plugin' {
*/
export type CharacterPair = [string, string];

/**
* An edit operation applied {@link DocumentDropEditProvider on drop}.
*/
export class DocumentDropEdit {
/**
* The text or snippet to insert at the drop location.
*/
insertText: string | SnippetString;

/**
* An optional additional edit to apply on drop.
*/
additionalEdit?: WorkspaceEdit;

/**
* @param insertText The text or snippet to insert at the drop location.
*/
constructor(insertText: string | SnippetString);
}

/**
* Provider which handles dropping of resources into a text editor.
*
* This allows users to drag and drop resources (including resources from external apps) into the editor. While dragging
* and dropping files, users can hold down `shift` to drop the file into the editor instead of opening it.
* Requires `editor.dropIntoEditor.enabled` to be on.
*/
export interface DocumentDropEditProvider {
/**
* Provide edits which inserts the content being dragged and dropped into the document.
*
* @param document The document in which the drop occurred.
* @param position The position in the document where the drop occurred.
* @param dataTransfer A {@link DataTransfer} object that holds data about what is being dragged and dropped.
* @param token A cancellation token.
*
* @return A {@link DocumentDropEdit} or a thenable that resolves to such. The lack of a result can be
* signaled by returning `undefined` or `null`.
*/
provideDocumentDropEdits(document: TextDocument, position: Position, dataTransfer: DataTransfer, token: CancellationToken): ProviderResult<DocumentDropEdit>;
}

/**
* Represents a session of a currently logged in user.
*/
Expand Down
Loading