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 voiddragEnter(DropTargetEvent event)Deprecated.This implementation ofdragEnterpermits the default operation defined inevent.detailto be performed on the current data type defined inevent.currentDataType.voiddragOperationChanged(DropTargetEvent event)Deprecated.This implementation ofdragOperationChangedpermits the default operation defined inevent.detailto be performed on the current data type defined inevent.currentDataType.booleanperformDrop(Object data)Deprecated.Perform the drop.StringqueryOverwrite(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.booleanvalidateDrop(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:DropTargetAdapterThis implementation ofdragEnterpermits the default operation defined inevent.detailto be performed on the current data type defined inevent.currentDataType. For additional information seeDropTargetListener.dragEnter.- Specified by:
dragEnterin interfaceDropTargetListener- Overrides:
dragEnterin 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:DropTargetAdapterThis implementation ofdragOperationChangedpermits the default operation defined inevent.detailto be performed on the current data type defined inevent.currentDataType. For additional information seeDropTargetListener.dragOperationChanged.- Specified by:
dragOperationChangedin interfaceDropTargetListener- Overrides:
dragOperationChangedin 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:
performDropin classPluginDropAdapter- Parameters:
data- the drop data- Returns:
trueif the drop was successful, andfalseotherwise- See Also:
DropTargetListener.drop(org.eclipse.swt.dnd.DropTargetEvent)
-
queryOverwrite
public String queryOverwrite(String pathString)
Deprecated.Description copied from interface:IOverwriteQueryReturns 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:
queryOverwritein 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:
validateDropin classPluginDropAdapter- Parameters:
target- the object that the mouse is currently hovering over, ornullif the mouse is hovering over empty spacedragOperation- the current drag operation (copy, move, etc.)transferType- the current transfer type- Returns:
trueif the drop is valid, andfalseotherwise
-
-