A clear definition of "children feature" and its use cases? [message #195253] |
Wed, 02 July 2008 08:33 |
Eclipse User |
|
|
|
Originally posted by: zippo29.hotmail.fr
Hi all!
I have gone through some posts (if not all) that speak about "children
feature", I read the note in the GMF tutorial but I am still not
understanding completly.
They say it's for specify "where children are taken from". Sorry, but
children in a graphical meaning or semantic ? What does it mean taken from
(from where they are stored = containment)? It seems to be created to do a
derived association, am I right?
Adding on that that the use case they give as an example is very specific.
Does someone have a clear definition of "children feature" and how to use
it ?
Thanks in advance.
|
|
|
|
Re: A clear definition of "children feature" and its use cases? [message #195380 is a reply to message #195330] |
Wed, 02 July 2008 11:45 |
Eclipse User |
|
|
|
Originally posted by: zippo29.hotmail.fr
Thanks for your answer!
But is this the only use case it was made for ? Suppose I have a case
where I want to represent a node that has no containment with the root or
with any element in the diagram but just association:
EClass A <------ EClass B <>------> EClass C (B as root element)
or
EClass B <>------> EClass C ------> EClass A (B as root element)
Is the children feature serves me in this case?
|
|
|
|
Re: A clear definition of "children feature" and its use cases? [message #195631 is a reply to message #195387] |
Thu, 03 July 2008 12:13 |
Eclipse User |
|
|
|
Originally posted by: zippo29.hotmail.fr
Hi Alex!
I had to search on google to understand what "AFAIK" means! My english is
not that good :p!
AW(AnyWay ;)), I tried to create an editor for this case :
EClass D <>------>EClass E<>------>EClass B <>------> EClass C ------>
EClass A
EClass D <>------>EClass A
I created a main editor (Root D) Es contain Bs => no problem.
I created a sub-editor for the Bs: in the gmfmap B is the root element. I
created a top node for C and a top node for A with (containment
feature)and (children feature) left blank. So it's a phantom node. I
created a linkMapping representing the reference between C and A.
I generated the gmfgen ignoring the validating error (phatom nodes exist
not targeted ...) of the gmfmap. I generated the code(No complain from the
gmfgen).
My editor works fine. A nodes appears at the resource level as expected
from the phantom nodes.
From now, I have 3 questions :
- Is this a bug in gmf : gmfmap not valid and gmfgen valid and no problem
in generated code ?
- I want the As to be created in the D level instead of the resource
level. Is this possible ? If yes, how to do it ? EMF custom code or GMF
custom code ?
- I noticed that the As are shared between all the instances of B
diagrams i-e if I created a new instance of B all the As that ewxist in
the resource are loaded in my new diagram. I managed to handle this by
changing the XDiagramUpdater.getB_VisualIDSemanticChildren() method. Is
there a another/better way to do this ?
Thanks for your patience until the end!
Best regards
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03887 seconds