Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Drag & drop into container
Drag & drop into container [message #60575] Sun, 08 October 2006 13:48 Go to next message
John Rager is currently offline John RagerFriend
Messages: 15
Registered: July 2009
Junior Member
Hello all,

I have an EMF model with an element defined like this:

Class Section
leader : 0-1 reference to Leader (another class)
assistants: 0-M reference to Assistant (another class)

Of course, I have a containing "model root" class to hold multiple Sections.

When I run my model, it works as I'd expect - I can only create one leader
but I can create many assistants. I can only drag a leader in if there
isn't one already, but I can drag multiple assistants in - no problem.

Now, in GMF I've defined my mapping as follows:

Section
Compartment LeaderCompartment
Leader
Compartment AssistantsCompartment
Assistants

Seems to work fine at first - I get a Section rectangle with two
compartments, one for the leader and one for the assistants - I can create
only one leader but many assistants, and I can't drag the Leader tool to the
Assistants compartment or vice-versa. I can also drag leaders or assistants
from one Section to another. But here's where it goes wrong - for some
reason, it's allowing me to drag and assistant from one Section to the
Leader compartment in another. When I drop, it displays the assistant in
both the Leader and Assistant compartments. It's also allowing me to drag a
leader in one Section to another Section that already has a leader, and
displays two of them.

Both of these actions violate the underlying EMF model - niether action gets
persisted in the EMF model, and when I close and reopen the GMF model, the
labels for the incorrect entries get changed to what appears to be some
values from within the gmfgen model. As far as I know, I have the mapping
set up correctly - it seems to honor the object types and cardinality when I
use the create tools - it's just in drag & drop from one figure to another.

I'm running GMF version 1.0.0.v20060627-1200 if that helps.

Thanks for any info!
Re: Drag & drop into container [message #60598 is a reply to message #60575] Mon, 09 October 2006 13:51 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello John,

Can you please file a bugzilla entry for this problem? GMF currently does
not generate support for D&D and using generic one from the runtime part
instead. In general domain-specific support for D&D should be generated.

-----------------
Alex Shatalin
Re: Drag & drop into container [message #60599 is a reply to message #60575] Mon, 09 October 2006 14:09 Go to previous message
Artem Tikhomirov is currently offline Artem TikhomirovFriend
Messages: 222
Registered: July 2009
Senior Member
I feel it's the same as https://bugs.eclipse.org/bugs/show_bug.cgi?id=151975


"John" <jrager@nycap.rr.com> wrote in message
news:egavk6$ed1$1@utils.eclipse.org...
> Hello all,
>
> I have an EMF model with an element defined like this:
>
> Class Section
> leader : 0-1 reference to Leader (another class)
> assistants: 0-M reference to Assistant (another class)
>
> Of course, I have a containing "model root" class to hold multiple
> Sections.
>
> When I run my model, it works as I'd expect - I can only create one leader
> but I can create many assistants. I can only drag a leader in if there
> isn't one already, but I can drag multiple assistants in - no problem.
>
> Now, in GMF I've defined my mapping as follows:
>
> Section
> Compartment LeaderCompartment
> Leader
> Compartment AssistantsCompartment
> Assistants
>
> Seems to work fine at first - I get a Section rectangle with two
> compartments, one for the leader and one for the assistants - I can create
> only one leader but many assistants, and I can't drag the Leader tool to
> the Assistants compartment or vice-versa. I can also drag leaders or
> assistants from one Section to another. But here's where it goes wrong -
> for some reason, it's allowing me to drag and assistant from one Section
> to the Leader compartment in another. When I drop, it displays the
> assistant in both the Leader and Assistant compartments. It's also
> allowing me to drag a leader in one Section to another Section that
> already has a leader, and displays two of them.
>
> Both of these actions violate the underlying EMF model - niether action
> gets persisted in the EMF model, and when I close and reopen the GMF
> model, the labels for the incorrect entries get changed to what appears to
> be some values from within the gmfgen model. As far as I know, I have the
> mapping set up correctly - it seems to honor the object types and
> cardinality when I use the create tools - it's just in drag & drop from
> one figure to another.
>
> I'm running GMF version 1.0.0.v20060627-1200 if that helps.
>
> Thanks for any info!
>
Previous Topic:disable "connector tool"
Next Topic:take over coordinates from model into the diagram of the GMF editor?
Goto Forum:
  


Current Time: Thu Jan 02 23:12:00 GMT 2025

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

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

Back to the top