Package org.eclipse.ui.part
Class PluginDropAdapter
java.lang.Object
org.eclipse.swt.dnd.DropTargetAdapter
org.eclipse.jface.viewers.ViewerDropAdapter
org.eclipse.ui.part.PluginDropAdapter
- All Implemented Interfaces:
- EventListener,- DropTargetListener
- Direct Known Subclasses:
- CommonDropAdapter
Adapter for adding handling of the 
PluginTransfer drag and drop
 transfer type to a drop action.
 This class may be instantiated or subclassed.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe extension point attribute that defines the drop action class.Fields inherited from class org.eclipse.jface.viewers.ViewerDropAdapterLOCATION_AFTER, LOCATION_BEFORE, LOCATION_NONE, LOCATION_ON
- 
Constructor SummaryConstructorsConstructorDescriptionPluginDropAdapter(StructuredViewer viewer) Creates a plug-in drop adapter for the given viewer.
- 
Method SummaryModifier and TypeMethodDescriptionvoiddrop(DropTargetEvent event) This implementation ofdropdoes nothing.protected TransferDataReturns the current transfer.protected static IDropActionDelegateLoads the class that will perform the action associated with the given drop data.booleanperformDrop(Object data) Performs any work associated with the drop.booleanvalidateDrop(Object target, int operation, TransferData transferType) ThePluginDropAdapterimplementation of thisViewerDropAdaptermethod is used to notify the action that some aspect of the drop operation has changed.Methods inherited from class org.eclipse.jface.viewers.ViewerDropAdapterclearState, determineLocation, determineTarget, dragEnter, dragOperationChanged, dragOver, dropAccept, getBounds, getCurrentEvent, getCurrentLocation, getCurrentOperation, getCurrentTarget, getFeedbackEnabled, getSelectedObject, getThreshold, getViewer, handleException, overrideOperation, setExpandEnabled, setFeedbackEnabled, setScrollEnabled, setScrollExpandEnabled, setSelectionFeedbackEnabledMethods inherited from class org.eclipse.swt.dnd.DropTargetAdapterdragLeave
- 
Field Details- 
ATT_CLASSThe extension point attribute that defines the drop action class.- See Also:
 
 
- 
- 
Constructor Details- 
PluginDropAdapterCreates a plug-in drop adapter for the given viewer.- Parameters:
- viewer- the viewer
 
 
- 
- 
Method Details- 
dropDescription copied from class:DropTargetAdapterThis implementation ofdropdoes nothing. For additional information seeDropTargetListener.drop.- Specified by:
- dropin interface- DropTargetListener
- Overrides:
- dropin class- ViewerDropAdapter
- Parameters:
- event- the information associated with the drop event
- See Also:
 
- 
getCurrentTransferReturns the current transfer.
- 
getPluginAdapterLoads the class that will perform the action associated with the given drop data.- Parameters:
- data- the drop data
- Returns:
- the viewer drop adapter
- Throws:
- CoreException
 
- 
performDropDescription copied from class:ViewerDropAdapterPerforms any work associated with the drop.Subclasses must implement this method to provide drop behavior. - Specified by:
- performDropin class- ViewerDropAdapter
- Parameters:
- data- the drop data
- Returns:
- trueif the drop was successful, and- falseotherwise
- See Also:
 
- 
validateDropThePluginDropAdapterimplementation of thisViewerDropAdaptermethod is used to notify the action that some aspect of the drop operation has changed. Subclasses may override.- Specified by:
- validateDropin class- ViewerDropAdapter
- Parameters:
- target- the object that the mouse is currently hovering over, or- nullif the mouse is hovering over empty space
- operation- the current drag operation (copy, move, etc.)
- transferType- the current transfer type
- Returns:
- trueif the drop is valid, and- falseotherwise
 
 
-