ReadonlydragThe mime types that the handleDrag method of this TreeDragAndDropController may add to the tree data transfer.
This could be well-defined, existing, mime types, and also mime types defined by the extension.
The recommended mime type of the tree (application/vnd.code.tree.<treeidlowercase>) will be automatically added.
ReadonlydropThe mime types that the handleDrop method of this DragAndDropController supports.
This could be well-defined, existing, mime types, and also mime types defined by the extension.
To support drops from trees, you will need to add the mime type of that tree.
This includes drops from within the same tree.
The mime type of a tree is recommended to be of the format application/vnd.code.tree.<treeidlowercase>.
Use the special files mime type to support all types of dropped files files, regardless of the file's actual mime type.
To learn the mime type of a dragged item:
DragAndDropControllerNote that mime types that cannot be sent to the extension will be omitted.
OptionalhandleWhen the user starts dragging items from this DragAndDropController, handleDrag will be called.
Extensions can use handleDrag to add their DataTransferItem items to the drag and drop.
When the items are dropped on another tree item in the same tree, your DataTransferItem objects
will be preserved. Use the recommended mime type for the tree (application/vnd.code.tree.<treeidlowercase>) to add
tree objects in a data transfer. See the documentation for DataTransferItem for how best to take advantage of this.
To add a data transfer item that can be dragged into the editor, use the application specific mime type "text/uri-list".
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,
set the Uri's fragment to L3,5, where 3 is the line number and 5 is the column number.
The source items for the drag and drop operation.
The data transfer associated with this drag.
A cancellation token indicating that drag has been cancelled.
OptionalhandleCalled when a drag and drop action results in a drop on the tree that this DragAndDropController belongs to.
Extensions should fire onDidChangeTreeData for any elements that need to be refreshed.
The target tree element that the drop is occurring on. When undefined, the target is the root.
The data transfer items of the source of the drag.
A cancellation token indicating that the drop has been cancelled.
Provides support for drag and drop in
TreeView.