handleDrag

abstract var handleDrag: (ReadonlyArray<T>, dataTransfer: DataTransfer, token: CancellationToken) -> PromiseLike<Void?>??(source)

When 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.

Mime types added in handleDrag won't be available outside the application.

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 \r\n. 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.

Parameters

source

The source items for the drag and drop operation.

dataTransfer

The data transfer associated with this drag.

token

A cancellation token indicating that drag has been cancelled.

Online Documentation