Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Reusing Node Mappings
Reusing Node Mappings [message #638479] Thu, 11 November 2010 12:43 Go to next message
Eclipse UserFriend
Originally posted by: marius.groeger.googlemail.com

Dear GMF Friends,

when reusing Node Mappings according to [1], why is it that multiple
EditParts are generated for each reusing instance in the gmfmap? For
example, consider this:

Top Node Reference: ContainerA
Node Mapping: ContainerA <------------------------+
Child Reference: ContainedElement |
Node Mapping: ContainedElement |
...details for ContainedElement follow... |
|
Top Node Reference: ContainerB |
Node Mapping: ContainerB |
Child Reference: ContainedElement ---------------+

In the generated code you will find:

* ContainedElementEditPart
* ContainedElement2EditPart

It seems to me that, in the generated editor, that double nature
prevents me from freely moving ContainedElements from ContainerA to
ContainerB and vice versa, since the EditParts would have to be
transformed on the fly.

- Can somebody confirm this or might I overlook s.th. here?

- What is the rationale of this behaviour? To me it looks like a bug.

- Is there a reasonable work-around for this?

Thanks
Marius

[1]
http://wiki.eclipse.org/GMF_MapModel_Hints#Show_children_ele ments_from_non-containment_feature
Re: Reusing Node Mappings [message #638509 is a reply to message #638479] Thu, 11 November 2010 14:10 Go to previous message
Eclipse UserFriend
Originally posted by: marius.groeger.googlemail.com

On 11.11.2010 13:43, Marius Gröger wrote:
> Dear GMF Friends,
>
> when reusing Node Mappings according to [1], why is it that multiple
> EditParts are generated for each reusing instance in the gmfmap? For
> example, consider this:
....
> It seems to me that, in the generated editor, that double nature
> prevents me from freely moving ContainedElements from ContainerA to
> ContainerB and vice versa, since the EditParts would have to be
> transformed on the fly.

I need to correct myself: this only happened because I used the
SemiCanonicalDiagramEditPolicy from [1]. With this EP in place, the
result of the re-parenting done to the semantic model is not properly
synchronized to the diagram. I guess I need to think a little bit here
or go ask on the gmf-tools mailing list.

Regards,
Marius

[1] http://code.google.com/p/gmftools/wiki/SemiCanonicalDiagramE ditPolicy
Previous Topic:OCL Constraint: Check if first node after start is of type initial validation
Next Topic:Manipulating GmfMap from Ecore2GMF
Goto Forum:
  


Current Time: Fri Apr 26 14:05:48 GMT 2024

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

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

Back to the top