Package org.eclipse.ui.views.navigator
Class NavigatorDropAdapter
- java.lang.Object
-
- org.eclipse.swt.dnd.DropTargetAdapter
-
- org.eclipse.jface.viewers.ViewerDropAdapter
-
- org.eclipse.ui.part.PluginDropAdapter
-
- org.eclipse.ui.views.navigator.NavigatorDropAdapter
-
- All Implemented Interfaces:
EventListener
,DropTargetListener
,SWTEventListener
,IOverwriteQuery
@Deprecated public class NavigatorDropAdapter extends PluginDropAdapter implements IOverwriteQuery
Deprecated.as of 3.5, use the Common Navigator Framework classes insteadImplements drop behaviour for drag and drop operations that land on the resource navigator.- Since:
- 2.0
-
-
Field Summary
-
Fields inherited from class org.eclipse.ui.part.PluginDropAdapter
ATT_CLASS
-
Fields inherited from class org.eclipse.jface.viewers.ViewerDropAdapter
LOCATION_AFTER, LOCATION_BEFORE, LOCATION_NONE, LOCATION_ON
-
-
Constructor Summary
Constructors Constructor Description NavigatorDropAdapter(StructuredViewer viewer)
Deprecated.Constructs a new drop adapter.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
dragEnter(DropTargetEvent event)
Deprecated.This implementation ofdragEnter
permits the default operation defined inevent.detail
to be performed on the current data type defined inevent.currentDataType
.void
dragOperationChanged(DropTargetEvent event)
Deprecated.This implementation ofdragOperationChanged
permits the default operation defined inevent.detail
to be performed on the current data type defined inevent.currentDataType
.boolean
performDrop(Object data)
Deprecated.Perform the drop.String
queryOverwrite(String pathString)
Deprecated.Returns one of the return code constants declared on this interface, indicating whether the entity represented by the passed String should be overwritten.boolean
validateDrop(Object target, int dragOperation, TransferData transferType)
Deprecated.This method is used to notify the action that some aspect of the drop operation has changed.-
Methods inherited from class org.eclipse.ui.part.PluginDropAdapter
drop, getCurrentTransfer, getPluginAdapter
-
Methods inherited from class org.eclipse.jface.viewers.ViewerDropAdapter
clearState, determineLocation, determineTarget, dragOver, dropAccept, getBounds, getCurrentEvent, getCurrentLocation, getCurrentOperation, getCurrentTarget, getFeedbackEnabled, getSelectedObject, getThreshold, getViewer, handleException, overrideOperation, setExpandEnabled, setFeedbackEnabled, setScrollEnabled, setScrollExpandEnabled, setSelectionFeedbackEnabled
-
Methods inherited from class org.eclipse.swt.dnd.DropTargetAdapter
dragLeave
-
-
-
-
Constructor Detail
-
NavigatorDropAdapter
public NavigatorDropAdapter(StructuredViewer viewer)
Deprecated.Constructs a new drop adapter.- Parameters:
viewer
- the navigator's viewer
-
-
Method Detail
-
dragEnter
public void dragEnter(DropTargetEvent event)
Deprecated.Description copied from class:DropTargetAdapter
This implementation ofdragEnter
permits the default operation defined inevent.detail
to be performed on the current data type defined inevent.currentDataType
. For additional information seeDropTargetListener.dragEnter
.- Specified by:
dragEnter
in interfaceDropTargetListener
- Overrides:
dragEnter
in classViewerDropAdapter
- Parameters:
event
- the information associated with the drag enter event- See Also:
DropTargetEvent
-
dragOperationChanged
public void dragOperationChanged(DropTargetEvent event)
Deprecated.Description copied from class:DropTargetAdapter
This implementation ofdragOperationChanged
permits the default operation defined inevent.detail
to be performed on the current data type defined inevent.currentDataType
. For additional information seeDropTargetListener.dragOperationChanged
.- Specified by:
dragOperationChanged
in interfaceDropTargetListener
- Overrides:
dragOperationChanged
in classViewerDropAdapter
- Parameters:
event
- the information associated with the drag operation changed event- See Also:
DropTargetEvent
-
performDrop
public boolean performDrop(Object data)
Deprecated.Perform the drop.- Overrides:
performDrop
in classPluginDropAdapter
- Parameters:
data
- the drop data- Returns:
true
if the drop was successful, andfalse
otherwise- See Also:
DropTargetListener.drop(org.eclipse.swt.dnd.DropTargetEvent)
-
queryOverwrite
public String queryOverwrite(String pathString)
Deprecated.Description copied from interface:IOverwriteQuery
Returns one of the return code constants declared on this interface, indicating whether the entity represented by the passed String should be overwritten.This method may be called from a non-UI thread, in which case this method must run the query in a sync exec in the UI thread, if it needs to query the user.
- Specified by:
queryOverwrite
in interfaceIOverwriteQuery
- Parameters:
pathString
- the path representing the entity to be overwritten- Returns:
- one of the return code constants declared on this interface
-
validateDrop
public boolean validateDrop(Object target, int dragOperation, TransferData transferType)
Deprecated.This method is used to notify the action that some aspect of the drop operation has changed.- Overrides:
validateDrop
in classPluginDropAdapter
- Parameters:
target
- the object that the mouse is currently hovering over, ornull
if the mouse is hovering over empty spacedragOperation
- the current drag operation (copy, move, etc.)transferType
- the current transfer type- Returns:
true
if the drop is valid, andfalse
otherwise
-
-