- Direct Known Subclasses:
CommonDragAdapterby providing new TransferTypes and the logic to handle setting up the transfer data. Clients must extend this class as part of the org.eclipse.ui.navigator.viewer/dragAssistant extension. By default, the Common Navigator supports
Clients may extend this class.
Method SummaryModifier and TypeMethodDescription
voidAllows the drag assistant to do any necessary cleanup after the drop operation is done.
voidAllows the drag assistant indicate it wants to participate in the drag operation.
abstract TransferExtra TransferTypes allow the Navigator to generate different kinds of payloads for DND clients.
final voidAccept and remember the content service this assistant is associated with.
abstract booleanSet the value of the
Event.datafield using the given selection.
getSupportedTransferTypespublic abstract Transfer getSupportedTransferTypes()Extra TransferTypes allow the Navigator to generate different kinds of payloads for DND clients. By default, the
CommonDragAdapterAssistants can extend the available TransferTypes that a Common Navigator Viewer can generate. Clients should return the set of Transfer Types they support. When a drop event occurs, the available drag assistants will be searched for a enabled assistants for the
DragSourceEvent. Only if the drop event occurs will
setDragData(DragSourceEvent, IStructuredSelection)be called. If the drop event is cancelled,
setDragData(DragSourceEvent, IStructuredSelection)will not be called.
- The added transfer types. (e.g. FileTransfer.getInstance()).
setDragDataSet the value of the
Event.datafield using the given selection. Clients will only have an opportunity to set the drag data if they have returned a matching Transfer Type from
Clients will only have an opportunity to set the data when the drop event occurs. If the drop operation is cancelled, then this method will not be called.
dragStartAllows the drag assistant indicate it wants to participate in the drag operation. This is called at
anEvent- The event object should return doit = true if it wants to participate in the drag and set doit = false if it does not want to further participate.
aSelection- The current selection from the viewer.
dragFinishedAllows the drag assistant to do any necessary cleanup after the drop operation is done. This is called at
DragSourceListener.dragFinished(DragSourceEvent)time. This is called on the same assistant that was called for the set data.
getContentServicepublic INavigatorContentService getContentService()
- The associated content service.
getShellpublic final Shell getShell()
- The shell for the viewer this assistant is associated with or the shell of the active workbench window.