Skip to main content



      Home
Home » Eclipse Projects » GEF » drag and drop between two plugins
drag and drop between two plugins [message #228663] Thu, 04 January 2007 10:39 Go to next message
Eclipse UserFriend
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 #228695 is a reply to message #228663] Thu, 04 January 2007 16:09 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: drag and drop between two plugins [message #228711 is a reply to message #228695] Thu, 04 January 2007 17:56 Go to previous message
Eclipse UserFriend
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
>
>
Previous Topic:org.eclipse.gef.text.examples
Next Topic:Context Sensitive help for AbstractGraphicalEditPart
Goto Forum:
  


Current Time: Thu May 22 23:00:16 EDT 2025

Powered by FUDForum. Page generated in 0.04586 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top