parallel child references / link mapping [message #162200] |
Fri, 23 November 2007 03:59  |
Eclipse User |
|
|
|
Originally posted by: manja.wolf.web.de
Hi,
I want to show an object A (as rectangle) with child objects B and C
(also rectangles), which are contained in the object/ rectangle A.
Object A is a class in the .ecore Model. Objects B and C are child
elements and references to another class D in the .ecore-model:
A
- B : D
- C : D
D
In the .gmfgraph, I defined own descriptors for A, B, C. In A there is,
for each (B and C) a "child access" to the descriptors of B and C. In
the .gmfmap, I defined two child references under A - one for B and one
for C.
..gmfmap:
top node reference A
- child reference B
- child reference C
Generation is without errors. However only the first object of the two
child references is shown.
B and C are automatically created with "feature seq initializer". This
works fine. I found the initializer in the
"diagram/providers/ElementInitializer.java". The elements are created,
but only in the default.xxx. In the default.xxx_diagramm there is only
the first referenced element (B) (if you look at the xml-view of the
default.xxx_diagramm).
I have the same problem with two link mappings. The second kind of
connection is only shown after inserting a new object to the canvas.
Is it forbidden to define more then one parallel child reference or link
mapping?
In which class can I correct this, and how? Or is there a way to correct
it at the model level (.gmfgraph, .gmfmap, .gmfgen) and how?
Thanks for your help.
Manja
|
|
|
|
Re: parallel child references / link mapping [message #162619 is a reply to message #162611] |
Sun, 25 November 2007 15:57  |
Eclipse User |
|
|
|
Originally posted by: manja.wolf.web.de
Appendix:
In .ecore Modell:
B&C has two possible instances (lower bound: 2 and upper bound: 2).
If you look only at the .ecore model, I have three possibilities to
instanciate B&C: with two B's, two C's or one B and one C. This is for
me not exactly enaugh. For the moment it works with the definition in
the .gmfgraph, where I defined the creation of B and C automatically.
But for me is it more a workaround then a solution.
Regards,
Manja
>
> Only a refinement (inheritance) in the .ecore model effect the desired
> behavior:
>
> A
> - B&C : D
>
> D
>
> B : D
> c : D
>
> The gmfmap shows now like that:
>
> top node reference A
> - child reference B&C : B
> -->node mapping B
> - child reference B&C : C
> --> node mapping C
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.45036 seconds