public class BasicDropAdapterAssistant
extends org.eclipse.ui.navigator.CommonDropAdapterAssistant
Modifier and Type | Field and Description |
---|---|
static float |
DND_LOCATION_DROP_ON_FIRST
Drop location constant for obtaining the following drop behavior: Always try to DROP_ON first, and, if this is
not possible, try to DROP_INSERT.
|
static int |
DND_OPERATIONS_DROP_COPY_DROP_MOVE_DROP_LINK |
Constructor and Description |
---|
BasicDropAdapterAssistant() |
Modifier and Type | Method and Description |
---|---|
protected org.eclipse.core.runtime.IStatus |
doExecute(org.eclipse.emf.edit.domain.EditingDomain domain,
org.eclipse.emf.common.command.Command command) |
protected java.util.Collection<?> |
getChildren(java.lang.Object object) |
protected float |
getDefaultDragAndDropLocation()
Returns the default drop location to be used for creating
DragAndDropCommand s in situations where this
information cannot be obtained from the context. |
protected int |
getDefaultDragAndDropOperations()
Returns the default drag and drop operations bit mask to be used for creating
DragAndDropCommand s in
situations where this information cannot be obtained from the context. |
protected org.eclipse.emf.transaction.TransactionalEditingDomain |
getEditingDomain(java.lang.Object target) |
protected java.lang.Object |
getParent(java.lang.Object object) |
protected java.util.List<org.eclipse.emf.ecore.EObject> |
getSelectedEObjects() |
protected java.util.List<org.eclipse.emf.ecore.EObject> |
getSelectedEObjects(org.eclipse.jface.viewers.IStructuredSelection selection) |
protected java.util.List<java.lang.Object> |
getSelection() |
org.eclipse.core.runtime.IStatus |
handleDrop(org.eclipse.ui.navigator.CommonDropAdapter dropAdapter,
org.eclipse.swt.dnd.DropTargetEvent event,
java.lang.Object target) |
protected org.eclipse.core.runtime.IStatus |
handleDropCopy(java.lang.Object target,
org.eclipse.ui.navigator.CommonDropAdapter dropAdapter,
org.eclipse.swt.dnd.DropTargetEvent event) |
protected org.eclipse.core.runtime.IStatus |
handleDropMove(java.lang.Object target,
org.eclipse.ui.navigator.CommonDropAdapter dropAdapter,
org.eclipse.swt.dnd.DropTargetEvent event) |
protected org.eclipse.core.runtime.IStatus |
promptAndExecute(org.eclipse.emf.transaction.TransactionalEditingDomain domain,
org.eclipse.emf.common.command.Command command,
java.lang.String title,
java.lang.String msg) |
protected org.eclipse.core.runtime.IStatus |
promptAndExecuteDropCopy(org.eclipse.emf.transaction.TransactionalEditingDomain domain,
java.lang.Object target,
org.eclipse.emf.common.command.Command command,
java.lang.String title,
java.lang.String msg) |
protected org.eclipse.core.runtime.IStatus |
promptAndExecuteDropMove(org.eclipse.emf.transaction.TransactionalEditingDomain domain,
java.lang.Object target,
org.eclipse.emf.common.command.Command command,
java.lang.String title,
java.lang.String msg) |
org.eclipse.core.runtime.IStatus |
validateDrop(java.lang.Object target,
int operation,
org.eclipse.swt.dnd.TransferData transferType) |
public static final int DND_OPERATIONS_DROP_COPY_DROP_MOVE_DROP_LINK
public static final float DND_LOCATION_DROP_ON_FIRST
public org.eclipse.core.runtime.IStatus handleDrop(org.eclipse.ui.navigator.CommonDropAdapter dropAdapter, org.eclipse.swt.dnd.DropTargetEvent event, java.lang.Object target)
handleDrop
in class org.eclipse.ui.navigator.CommonDropAdapterAssistant
public org.eclipse.core.runtime.IStatus validateDrop(java.lang.Object target, int operation, org.eclipse.swt.dnd.TransferData transferType)
validateDrop
in class org.eclipse.ui.navigator.CommonDropAdapterAssistant
protected org.eclipse.core.runtime.IStatus handleDropCopy(java.lang.Object target, org.eclipse.ui.navigator.CommonDropAdapter dropAdapter, org.eclipse.swt.dnd.DropTargetEvent event)
protected org.eclipse.core.runtime.IStatus handleDropMove(java.lang.Object target, org.eclipse.ui.navigator.CommonDropAdapter dropAdapter, org.eclipse.swt.dnd.DropTargetEvent event)
protected float getDefaultDragAndDropLocation()
DragAndDropCommand
s in situations where this
information cannot be obtained from the context. It should be in the range of 0.0 to 1.0, indicating the relative
vertical location of the drop operation, where 0.0 is at the top and 1.0 is at the bottom.
This implementation returns DND_LOCATION_DROP_ON_FIRST
as default. Clients may override this method and
return other values as appropriate.
DragAndDropCommand
s.protected int getDefaultDragAndDropOperations()
DragAndDropCommand
s in
situations where this information cannot be obtained from the context. It is intended to be a mask of bitwise
or-ed DND#DROP_*
values indicating the desired drag and drop operation types.
This implementation returns DND_OPERATIONS_DROP_COPY_DROP_MOVE_DROP_LINK
as default. Clients may
override this method and return other values as appropriate.
DragAndDropCommand
s.protected java.util.List<java.lang.Object> getSelection()
protected java.util.List<org.eclipse.emf.ecore.EObject> getSelectedEObjects()
protected java.util.List<org.eclipse.emf.ecore.EObject> getSelectedEObjects(org.eclipse.jface.viewers.IStructuredSelection selection)
protected java.lang.Object getParent(java.lang.Object object)
protected java.util.Collection<?> getChildren(java.lang.Object object)
protected org.eclipse.emf.transaction.TransactionalEditingDomain getEditingDomain(java.lang.Object target)
protected org.eclipse.core.runtime.IStatus promptAndExecuteDropCopy(org.eclipse.emf.transaction.TransactionalEditingDomain domain, java.lang.Object target, org.eclipse.emf.common.command.Command command, java.lang.String title, java.lang.String msg)
protected org.eclipse.core.runtime.IStatus promptAndExecuteDropMove(org.eclipse.emf.transaction.TransactionalEditingDomain domain, java.lang.Object target, org.eclipse.emf.common.command.Command command, java.lang.String title, java.lang.String msg)
protected org.eclipse.core.runtime.IStatus promptAndExecute(org.eclipse.emf.transaction.TransactionalEditingDomain domain, org.eclipse.emf.common.command.Command command, java.lang.String title, java.lang.String msg)
protected org.eclipse.core.runtime.IStatus doExecute(org.eclipse.emf.edit.domain.EditingDomain domain, org.eclipse.emf.common.command.Command command)