Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Drag and Drop DND with EMF and GEF
Drag and Drop DND with EMF and GEF [message #234320] Tue, 22 May 2007 10:24 Go to next message
Eclipse UserFriend
Originally posted by: exquisitus.example.com

I'm trying to extend a working EMF application by providing a GEF Editor page for the generated EMF editor.

In particular, I want to be able to drag an item from the GraphicalViewer to the Outline View (amongst other things).

I have been successful in supporting DND using the EMF method LocalTransfer, from a ListViewer.

However, the Graphical Viewer doesn't inherit from Viewer, so that method doesn't work with the EditPartViewer (GraphicalViewer).

I tried to use the AbstractTransferDragSourceListener, and I managed to get the correct data in event.data.
However, event.data is only present once, and then seems to be discarded, while event.doit remains (or gets reset to) "true", so
apparently the data gets lost somewhere on the way to the Droptarget.

Please help me on either of two possible solutions:
1) What do I have to do to make sure the data stays stable, using the GEF Transfer?
2) How do I get the GEF viewer to work with the EMF style?
Re: Drag and Drop DND with EMF and GEF [message #234334 is a reply to message #234320] Tue, 22 May 2007 14:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Nicolai,

I really don't know enough about GEF to help answer this. Perhaps
having a look at the GMF project would be useful since it integrates GEF
and EMF.


Nicolai Czempin wrote:
> I'm trying to extend a working EMF application by providing a GEF
> Editor page for the generated EMF editor.
>
> In particular, I want to be able to drag an item from the
> GraphicalViewer to the Outline View (amongst other things).
>
> I have been successful in supporting DND using the EMF method
> LocalTransfer, from a ListViewer.
>
> However, the Graphical Viewer doesn't inherit from Viewer, so that
> method doesn't work with the EditPartViewer (GraphicalViewer).
>
> I tried to use the AbstractTransferDragSourceListener, and I managed
> to get the correct data in event.data.
> However, event.data is only present once, and then seems to be
> discarded, while event.doit remains (or gets reset to) "true", so
> apparently the data gets lost somewhere on the way to the Droptarget.
>
> Please help me on either of two possible solutions:
> 1) What do I have to do to make sure the data stays stable, using the
> GEF Transfer?
> 2) How do I get the GEF viewer to work with the EMF style?
Re: Drag and Drop DND with EMF and GEF [message #234348 is a reply to message #234334] Tue, 22 May 2007 15:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: exquisitus.example.com

Ed,

thanks for the feedback. That's why I cross-posted to both the newsgroups.

I did have a look at GMF but it works with a not-yet-released version of Eclipse. I was even prepared to go the route of the 3.3RC1,
but I had too much trouble getting anything (I don't remember the details, but many plug-ins caused trouble, or the update sites
didn't have what I needed, or something like that) to work to spend any more time on it under a project-pressure situation.

So for the moment I'm trying a workaround, by sort of stealing the EMF ViewerDragAdapter and getting it to work with the GEF viewer.
It seems that they work similarly, but their naming is slightly different.
For some reason GEF has an EditPartViewer which is not actually a jface.viewers.Viewer, etc.


Ed Merks schrieb:
> Nicolai,
>
> I really don't know enough about GEF to help answer this. Perhaps
> having a look at the GMF project would be useful since it integrates GEF
> and EMF.
>
>
> Nicolai Czempin wrote:
>> I'm trying to extend a working EMF application by providing a GEF
>> Editor page for the generated EMF editor.
>>
>> In particular, I want to be able to drag an item from the
>> GraphicalViewer to the Outline View (amongst other things).
>>
>> I have been successful in supporting DND using the EMF method
>> LocalTransfer, from a ListViewer.
>>
>> However, the Graphical Viewer doesn't inherit from Viewer, so that
>> method doesn't work with the EditPartViewer (GraphicalViewer).
>>
>> I tried to use the AbstractTransferDragSourceListener, and I managed
>> to get the correct data in event.data.
>> However, event.data is only present once, and then seems to be
>> discarded, while event.doit remains (or gets reset to) "true", so
>> apparently the data gets lost somewhere on the way to the Droptarget.
>>
>> Please help me on either of two possible solutions:
>> 1) What do I have to do to make sure the data stays stable, using the
>> GEF Transfer?
>> 2) How do I get the GEF viewer to work with the EMF style?
Re: Drag and Drop DND with EMF and GEF [message #234356 is a reply to message #234348] Tue, 22 May 2007 15:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Nicolai,

The GMF project has a version that works with Eclipse 3.2.x.


Nicolai Czempin wrote:
> Ed,
>
> thanks for the feedback. That's why I cross-posted to both the
> newsgroups.
>
> I did have a look at GMF but it works with a not-yet-released version
> of Eclipse. I was even prepared to go the route of the 3.3RC1, but I
> had too much trouble getting anything (I don't remember the details,
> but many plug-ins caused trouble, or the update sites didn't have what
> I needed, or something like that) to work to spend any more time on it
> under a project-pressure situation.
>
> So for the moment I'm trying a workaround, by sort of stealing the EMF
> ViewerDragAdapter and getting it to work with the GEF viewer.
> It seems that they work similarly, but their naming is slightly
> different.
> For some reason GEF has an EditPartViewer which is not actually a
> jface.viewers.Viewer, etc.
>
>
> Ed Merks schrieb:
>> Nicolai,
>>
>> I really don't know enough about GEF to help answer this. Perhaps
>> having a look at the GMF project would be useful since it integrates
>> GEF and EMF.
>>
>>
>> Nicolai Czempin wrote:
>>> I'm trying to extend a working EMF application by providing a GEF
>>> Editor page for the generated EMF editor.
>>>
>>> In particular, I want to be able to drag an item from the
>>> GraphicalViewer to the Outline View (amongst other things).
>>>
>>> I have been successful in supporting DND using the EMF method
>>> LocalTransfer, from a ListViewer.
>>>
>>> However, the Graphical Viewer doesn't inherit from Viewer, so that
>>> method doesn't work with the EditPartViewer (GraphicalViewer).
>>>
>>> I tried to use the AbstractTransferDragSourceListener, and I managed
>>> to get the correct data in event.data.
>>> However, event.data is only present once, and then seems to be
>>> discarded, while event.doit remains (or gets reset to) "true", so
>>> apparently the data gets lost somewhere on the way to the Droptarget.
>>>
>>> Please help me on either of two possible solutions:
>>> 1) What do I have to do to make sure the data stays stable, using
>>> the GEF Transfer?
>>> 2) How do I get the GEF viewer to work with the EMF style?
Re: Drag and Drop DND with EMF and GEF [message #234362 is a reply to message #234356] Tue, 22 May 2007 15:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: exquisitus.example.com

Ed,

yes, version 1.0.3. I tried it but had some problems that I wasn't able to resolve quickly. When the pressure lifts a bit, I'll try
that path again, and reproduce whatever the problem was.

Ed Merks schrieb:
> Nicolai,
>
> The GMF project has a version that works with Eclipse 3.2.x.
>
>
> Nicolai Czempin wrote:
>> Ed,
>>
>> thanks for the feedback. That's why I cross-posted to both the
>> newsgroups.
>>
>> I did have a look at GMF but it works with a not-yet-released version
>> of Eclipse. I was even prepared to go the route of the 3.3RC1, but I
>> had too much trouble getting anything (I don't remember the details,
>> but many plug-ins caused trouble, or the update sites didn't have what
>> I needed, or something like that) to work to spend any more time on it
>> under a project-pressure situation.
>>
>> So for the moment I'm trying a workaround, by sort of stealing the EMF
>> ViewerDragAdapter and getting it to work with the GEF viewer.
>> It seems that they work similarly, but their naming is slightly
>> different.
>> For some reason GEF has an EditPartViewer which is not actually a
>> jface.viewers.Viewer, etc.
>>
>>
>> Ed Merks schrieb:
>>> Nicolai,
>>>
>>> I really don't know enough about GEF to help answer this. Perhaps
>>> having a look at the GMF project would be useful since it integrates
>>> GEF and EMF.
>>>
>>>
>>> Nicolai Czempin wrote:
>>>> I'm trying to extend a working EMF application by providing a GEF
>>>> Editor page for the generated EMF editor.
>>>>
>>>> In particular, I want to be able to drag an item from the
>>>> GraphicalViewer to the Outline View (amongst other things).
>>>>
>>>> I have been successful in supporting DND using the EMF method
>>>> LocalTransfer, from a ListViewer.
>>>>
>>>> However, the Graphical Viewer doesn't inherit from Viewer, so that
>>>> method doesn't work with the EditPartViewer (GraphicalViewer).
>>>>
>>>> I tried to use the AbstractTransferDragSourceListener, and I managed
>>>> to get the correct data in event.data.
>>>> However, event.data is only present once, and then seems to be
>>>> discarded, while event.doit remains (or gets reset to) "true", so
>>>> apparently the data gets lost somewhere on the way to the Droptarget.
>>>>
>>>> Please help me on either of two possible solutions:
>>>> 1) What do I have to do to make sure the data stays stable, using
>>>> the GEF Transfer?
>>>> 2) How do I get the GEF viewer to work with the EMF style?
Re: Drag and Drop DND with EMF and GEF [message #234420 is a reply to message #234356] Wed, 23 May 2007 02:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: exquisitus.example.com

Ed Merks schrieb:
> Nicolai,
>
> The GMF project has a version that works with Eclipse 3.2.x.
>
>

I tried again getting GMF to work. There is a release Build 1.0.3 that is meant to work with Eclipse 3.2.
At http://download.eclipse.org/modeling/gmf/downloads/drops/R-1 .0.3-200702091900/index.php it gives the requirements, amongst them
"EMF OCL Build M200611161546". When I click on "build page" it says "Sorry! There are no builds yet available for this component."

When I try to get the plug-ins via the Update mechanism, I get errors like this:
========0
Current configuration contains errors that are not corrected by the requested operation and more errors would be introduced. See
details for more information.
----- Current configuration problems -----
Graphical Modeling Framework Runtime (1.0.3.v20070202-1200-gW3quizrSB1Fxqp) requires feature "org.eclipse.emf.ocl (1.0.0)", or
compatible.
----- Configuration problems after the operation -----
CDO Utilities (0.7.1.v200610271316) requires feature "org.eclipse.net4j (0.7.1)", or compatible.
Eclipse Modeling Framework Technology Query OCL (1.1.0.v200703301543) requires plug-in "org.eclipse.ocl (1.1.0)", or compatible.
Net4j Examples (1.0.0.v200606271241) requires plug-in "org.eclipse.net4j".
EMF Model Query OCL Integration (1.1.0.v200704200841) requires plug-in "org.eclipse.ocl (1.1.0)", or compatible.

==============
even though I have selected the "emft ocl SDK..." feature that the update site offers me (and I have no idea where else to get the
"org.eclipse.ocl (1.1.0)").

I know, I know, I should ask in the GMF group. They'll tell me to ask in the EMF group, etc...

Why can't I simply download a
CURRENTLY STABLE version of GMF/GEF/EMF, that works with the CURRENTLY STABLE version of Eclipse (or preferably in one package)???

It seems that no-one is checking all these thousands of dependencies between the documentation, update sites, etc.

If I'm sounding frustrated, it's because I am. I really love using Eclipse as a platform, but you're all making it terribly
difficult to actually get some work done in the jungle of millions of release candidates of Milestones on Update sites depending on
whatever plug-ins.
Re: Drag and Drop DND with EMF and GEF [message #234427 is a reply to message #234320] Wed, 23 May 2007 02:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: exquisitus.example.com

The GMF route seems definitely out of the question, so I plead:

Has anyone managed to get DND to work between GEF and EMF???
Re: Drag and Drop DND with EMF and GEF [message #234855 is a reply to message #234320] Wed, 30 May 2007 22:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: exquisitus.example.com

Just as a note, I ended up implementing Drag and Drop "manually".

GEF and EMF in their currently-stable versions are not well synchronized, and GMF in the currently-stable (for the currently-stable
Eclipse) doesn't work with RCP.
Re: Drag and Drop DND with EMF and GEF [message #234872 is a reply to message #234855] Thu, 31 May 2007 17:28 Go to previous messageGo to next message
Anthony Hunter is currently offline Anthony HunterFriend
Messages: 446
Registered: July 2009
Senior Member
"Nicolai Czempin" <exquisitus@example.com> wrote in message
news:f3kvih$536$2@build.eclipse.org...
> Just as a note, I ended up implementing Drag and Drop "manually".

Hi Nicolai,

Can you tell us what you had to do?

I was going to reply back to look at the *GMF* logic editor example. It
demonstrates dragging from the EMF tree editor for the domain model to the
GMF diagram editor, but it does not appear to be working right now.

GEF also has an example in the GEF logic editor example where you can drag
onto a label, but that too is not working.

Cheers...
Anthony
Re: Drag and Drop DND with EMF and GEF [message #235314 is a reply to message #234872] Fri, 08 June 2007 18:35 Go to previous message
Anthony Hunter is currently offline Anthony HunterFriend
Messages: 446
Registered: July 2009
Senior Member
"Anthony Hunter" <anthonyh@ca.ibm.com> wrote in message
news:f3n0kr$9j2$1@build.eclipse.org...
>
> GEF also has an example in the GEF logic editor example where you can drag
> onto a label, but that too is not working.
>
Correction:

The label in GEF logic editor example supports text drag. For example you
can drag some text from WordPad onto a label.

Cheers...
Anthony
Previous Topic:GEF and draw2d : importing and editing images
Next Topic:How to draw curved text in draw2d
Goto Forum:
  


Current Time: Fri Mar 29 08:58:07 GMT 2024

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

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

Back to the top