Skip to content

Commit 4db0b18

Browse files
committed
Improve own mime type docs for tree dnd
Fixes microsoft#145906
1 parent d122abd commit 4db0b18

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/vscode-dts/vscode.d.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9819,8 +9819,9 @@ declare module 'vscode' {
98199819
* The mime types that the {@link TreeDragAndDropController.handleDrop `handleDrop`} method of this `DragAndDropController` supports.
98209820
* This could be well-defined, existing, mime types, and also mime types defined by the extension.
98219821
*
9822-
* Each tree will automatically support drops from its own `DragAndDropController`. To support drops from other trees,
9823-
* you will need to add the mime type of that tree. The mime type of a tree is of the format `application/vnd.code.tree.<treeidlowercase>`.
9822+
* To support drops from trees, you will need to add the mime type of that tree.
9823+
* This includes drops from within the same tree.
9824+
* The mime type of a tree is recommended to be of the format `application/vnd.code.tree.<treeidlowercase>`.
98249825
*
98259826
* To learn the mime type of a dragged item:
98269827
* 1. Set up your `DragAndDropController`
@@ -9834,6 +9835,8 @@ declare module 'vscode' {
98349835
/**
98359836
* The mime types that the {@link TreeDragAndDropController.handleDrag `handleDrag`} method of this `TreeDragAndDropController` may add to the tree data transfer.
98369837
* This could be well-defined, existing, mime types, and also mime types defined by the extension.
9838+
*
9839+
* The recommended mime type of the tree will be automatically added.
98379840
*/
98389841
readonly dragMimeTypes: string[];
98399842

@@ -9842,7 +9845,8 @@ declare module 'vscode' {
98429845
* Extensions can use `handleDrag` to add their {@link DataTransferItem `DataTransferItem`} items to the drag and drop.
98439846
*
98449847
* When the items are dropped on **another tree item** in **the same tree**, your `DataTransferItem` objects
9845-
* will be preserved. See the documentation for `DataTransferItem` for how best to take advantage of this.
9848+
* will be preserved. Use the recommended mime type for the tree (`application/vnd.code.tree.<treeidlowercase>`) to add
9849+
* tree objects in a data transfer. See the documentation for `DataTransferItem` for how best to take advantage of this.
98469850
*
98479851
* To add a data transfer item that can be dragged into the editor, use the application specific mime type "text/uri-list".
98489852
* The data for "text/uri-list" should be a string with `toString()`ed Uris separated by newlines. To specify a cursor position in the file,

0 commit comments

Comments
 (0)