public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant
Clients may not extend or instantiate this class for any purpose. Clients may have no direct dependencies on the contract of this class.
| Constructor and Description |
|---|
ResourceDropAdapterAssistant() |
| Modifier and Type | Method and Description |
|---|---|
IStatus |
handleDrop(CommonDropAdapter aDropAdapter,
DropTargetEvent aDropTargetEvent,
Object aTarget)
Carry out the DND operation.
|
IStatus |
handlePluginTransferDrop(IStructuredSelection aDragSelection,
Object aDropTarget)
Handle the drop operation for the target viewer.
|
boolean |
isSupportedType(TransferData aTransferType)
Clients may extend the supported transfer types beyond the default
LocalSelectionTransfer.getTransfer() and
PluginTransfer.getInstance() transfer types. |
IStatus |
validateDrop(Object target,
int aDropOperation,
TransferData transferType)
Validates dropping on the given object.
|
IStatus |
validatePluginTransferDrop(IStructuredSelection aDragSelection,
Object aDropTarget)
Return true if the client can handle the drop onto the target viewer of
the drop operation.
|
doInit, getContentService, getShell, initpublic boolean isSupportedType(TransferData aTransferType)
CommonDropAdapterAssistantLocalSelectionTransfer.getTransfer() and
PluginTransfer.getInstance() transfer types. When a transfer type
other than one of these is encountered, the DND Service will query the
visible and active descriptors that are enabled
for the drop target of the current operation.isSupportedType in class CommonDropAdapterAssistantaTransferType - The transfer data from the drop operationpublic IStatus validateDrop(Object target, int aDropOperation, TransferData transferType)
CommonDropAdapterAssistant
Subclasses must implement this method to define which drops make sense.
If clients return true, then they will be allowed to handle the drop in
CommonDropAdapterAssistant.handleDrop(CommonDropAdapter, DropTargetEvent, Object).
validateDrop in class CommonDropAdapterAssistanttarget - the object that the mouse is currently hovering over, or
null if the mouse is hovering over empty spaceaDropOperation - the current drag operation (copy, move, etc.)transferType - the current transfer typepublic IStatus handleDrop(CommonDropAdapter aDropAdapter, DropTargetEvent aDropTargetEvent, Object aTarget)
CommonDropAdapterAssistanthandleDrop in class CommonDropAdapterAssistantaDropAdapter - The Drop Adapter contains information that has already been
parsed from the drop event.aDropTargetEvent - The drop target event.aTarget - The object being dragged ontopublic IStatus validatePluginTransferDrop(IStructuredSelection aDragSelection, Object aDropTarget)
CommonDropAdapterAssistantThe default behavior of this method is to return Status.CANCEL_STATUS.
validatePluginTransferDrop in class CommonDropAdapterAssistantaDragSelection - The selection dragged from the viewer.aDropTarget - The target of the drop operation.public IStatus handlePluginTransferDrop(IStructuredSelection aDragSelection, Object aDropTarget)
CommonDropAdapterAssistantThe default behavior of this method is to return Status.CANCEL_STATUS.
handlePluginTransferDrop in class CommonDropAdapterAssistantaDragSelection - The selection dragged from the viewer.aDropTarget - The target of the drop operation.Guidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.