Drag and Drop Listeners Extension Points

org.eclipse.gmf.runtime.common.ui.services.dnd.dragDropListenerProviders

This extension point is used to register drag source and drop target listeners against element types within view parts.This extension point facilitates the configuration of providers for the drag/drop listener service (org.eclipse.gmf.runtime.common.ui.services.dnd.core.DragDropListenerService). The providers register listeners for drag and drop operations on specific element types within view parts.

<!ELEMENT extension (DragDropListenerProvider)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT DragDropListenerProvider (Priority , ViewId+)>

<!ATTLIST DragDropListenerProvider

id    CDATA #REQUIRED

class CDATA #REQUIRED>


<!ELEMENT Priority EMPTY>

<!ATTLIST Priority

name (Lowest|Low|Medium|High|Highest) >


<!ELEMENT ViewId (ElementType+)>

<!ATTLIST ViewId

id CDATA #REQUIRED>


<!ELEMENT ElementType (OperationType+)>

<!ATTLIST ElementType

class CDATA #REQUIRED>


<!ELEMENT OperationType (TransferId+)>

<!ATTLIST OperationType

operation (drag|drop) >


<!ELEMENT TransferId EMPTY>

<!ATTLIST TransferId

transferId CDATA #REQUIRED>


The following is an example of the drag and drop listener provider extension:

<extension id=

"dragDropListenerProviders"

name=

"%ext.dragDropListenerProviders"

point=

"org.eclipse.gmf.runtime.common.ui.services.dnd.dragDropListenerProviders"

>

<DragDropListenerProvider class=

"org.eclipse.test.project.ui.internal.providers.dnd.DragDropListenerProvider"

id=

"myExplorerDragDropListenerProvider"

>

<Priority name=

"Lowest"

>

</Priority>

<ViewId id=

"org.eclipse.test.project.ui.views.MyExplorer"

>

<ElementType class=

"org.eclipse.test.project.ui.internal.providers.myexplorer.MyElement"

>

<OperationType operation=

"drag"

>

<TransferId transferId=

"selection"

>

</TransferId>

<TransferId transferId=

"customData"

>

</TransferId>

<TransferId transferId=

"file"

>

</TransferId>

<TransferId transferId=

"text"

>

</TransferId>

<TransferId transferId=

"richText"

>

</TransferId>

</OperationType>

<OperationType operation=

"drop"

>

<TransferId transferId=

"selection"

>

</TransferId>

<TransferId transferId=

"customData"

>

</TransferId>

</OperationType>

</ElementType>

</ViewId>

</DragDropListenerProvider>

</extension>

The value of the class attribute must represent a subclass of org.eclipse.gmf.runtime.common.core.service.AbstractProvider that implements org.eclipse.gmf.runtime.common.ui.services.dnd.core.IDragDropListenerProvider, e.g. a subclass of org.eclipse.gmf.runtime.common.ui.services.dnd.core.AbstractDragDropListenerProvider.