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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 #234855 is a reply to message #234320] |
Wed, 30 May 2007 22:58 |
Eclipse User |
|
|
|
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.
|
|
| | |
Goto Forum:
Current Time: Fri Mar 29 08:58:07 GMT 2024
Powered by FUDForum. Page generated in 0.04054 seconds
|