drag and drop between two plugins [message #228663] |
Thu, 04 January 2007 15:39 |
Eclipse User |
|
|
|
Originally posted by: aleksandr_kravets.iwaysoftware.com
Hello,
I am trying to implement drag and drop functionality between two
plugins. Source plugin is a View with TreeViewer and target plugin is a
GEF editor. I want to be able to drag and drop nodes from the tree to
the editor.
I read this article:
http://www.eclipse.org/articles/Article-Workbench-DND/drag_d rop.html and
as far as I understand my source plugin needs to contribute to
org.eclipse.ui.dropActions extension point and data needs to be of type
PluginTransferData in order for drop to work. I am correct with this?
thanks,
Alex
|
|
|
|
Re: drag and drop between two plugins [message #228711 is a reply to message #228695] |
Thu, 04 January 2007 22:56 |
Eclipse User |
|
|
|
Originally posted by: aleksandr_kravets.iwaysoftware.com
Great. Thanks Anthony.
Anthony Hunter wrote:
> Hi Aleksandr,
>
> The two plug-ins need to support what type of data they are transferring and
> it does not have to be a PluginTransferData.
> If you look at the type hierarchy of org.eclipse.swt.dnd.ByteArrayTransfer,
> you can see the different types of data transfers.
> Both the drag source and drop target need to register their support for the
> data transfer type.
>
> To add special drop support to your diagram, look at the EditPartViewer you
> can addDropTargetListener().
> There are examples in each of the GEF examples to allow drag and drop from
> the palette onto the diagram.
>
> Cheers...
> Anthony
>
> "Aleksandr Kravets" <aleksandr_kravets@iwaysoftware.com> wrote in message
> news:enj74a$8hc$1@utils.eclipse.org...
>> Hello,
>>
>> I am trying to implement drag and drop functionality between two plugins.
>> Source plugin is a View with TreeViewer and target plugin is a GEF editor.
>> I want to be able to drag and drop nodes from the tree to the editor.
>>
>> I read this article:
>> http://www.eclipse.org/articles/Article-Workbench-DND/drag_d rop.html and
>> as far as I understand my source plugin needs to contribute to
>> org.eclipse.ui.dropActions extension point and data needs to be of type
>> PluginTransferData in order for drop to work. I am correct with this?
>>
>> thanks,
>> Alex
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04219 seconds