Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Child Reference containment/reference problem
Child Reference containment/reference problem [message #203595] Thu, 28 August 2008 09:35 Go to next message
Eclipse UserFriend
Originally posted by: thomasgrimson.hotmail.com

Hallo,

how can I define containment based on reference? For example, "A" contains
"B", "A" contains "C", "B" refers to "C". "A" is the domain top element, I
want to show "B"s as nodes (Top Node Reference), containing inside "C"s
(Child Reference). The problem is, "B" does not contain "C", but only
refers to it- how do I specify the Containment Feature of Child Reference
"C"?

Thanks in advance,
Tom
Re: Child Reference containment/reference problem [message #203617 is a reply to message #203595] Thu, 28 August 2008 10:02 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Tom,

Try using "childrenFeature" pointing to the reference from "B" to "C" for
"C" ChildReference created below "B" node mapping.

-----------------
Alex Shatalin
Re: Child Reference containment/reference problem [message #203663 is a reply to message #203617] Thu, 28 August 2008 12:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: thomasgrimson.hotmail.com

Hello Alex,

first thank you for the quick answer. I tried it, but it does not
validate: "'Containment Feature' must be owned by 'Domain Meta Element' or
its super type of this reference parent Node Mapping".

Here are the mappings: ('A' is domain element in CanvasMapping):
TopNodeReference for 'B'
NodeMapping for 'B'
ChildReference for 'C'
NodeMapping for 'C'

Properties of ChildReference for 'C':
childrenFeature: the reference from B to C
containmentFeature: the containment A contains C

Does the error message imply that the containment should be also from B?

Thank you in advance,
Tom
Re: Child Reference containment/reference problem [message #204831 is a reply to message #203663] Tue, 09 September 2008 16:10 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Tom,

Wich version of GMF do you use? We have introduced some changes into the
GMF "HEAD" just after release of 2.0, to this use case should be handled
in latest builds from "HEAD" GMF branch only..

-----------------
Alex Shatalin
Previous Topic:Multiple diagram editors, same model.
Next Topic:shadow Nodes cause problems for xml output
Goto Forum:
  


Current Time: Tue Sep 24 15:55:03 GMT 2024

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

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

Back to the top