Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Display Items in Nodes Compartments although they're not containted in the Node
Display Items in Nodes Compartments although they're not containted in the Node [message #222708] Wed, 25 March 2009 08:18 Go to next message
Daniel Rippel is currently offline Daniel RippelFriend
Messages: 29
Registered: July 2009
Junior Member
Hi everyone,
I'm rahter new to emf/gmf modelling and have two very similar problems.

First:
My EMF Model contains two Lists of Nodes. Some of the nodes in one list
are then referenced by the other node

Root
| --containment 0..* -- Property
| --containment 0..* -- Node
|--reference 0..*-- Property

When I now try to display the properties within a nodes Compartment, the
GMF validation always refuses to accept, that the "containment feature"
(set to the containment of the root node) is different from the
"children feature" (set to Nodes Reference List) and throwes
"'Containment Feature' must be owned by 'Domain Meta Element' or its
super type of this reference parent Node Mapping" although the
containment belongs to the Domain Meta Element.

Is there any way to bypass this error? I alway have to add some code to
the generated creationActions because it tries to set the owner als well
as the childholder to Node. (could bypass this by adding .eContainer()
to the owner definition...)

Second:
The second question is very similar.
I have another node, that contains an Operator, which again references
exactly one of the global properties. Is there any way to display the
complete operator (operator and referenced property) in the Nodes
compartment? Actually I could not find without completely writing custom
code.


Thanks in advance,
Daniel
Re: Display Items in Nodes Compartments although they're not containtedin the Node [message #223281 is a reply to message #222708] Mon, 30 March 2009 15:15 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Daniel,

You can try creating derived feature in "Node" pointing to the "Properties"
and use this feature as a containment one for child mapping of properties
below a compartment in Nodes.
In general this use case is not covered with GMF, but you can ignore validation
problems, generate code and then coddect it manually.

-----------------
Alex Shatalin
Previous Topic:Object Property change is not reflected in the diagram
Next Topic:Why are my Figures not drawn?
Goto Forum:
  


Current Time: Fri Apr 26 14:12:15 GMT 2024

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

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

Back to the top