parallel child references / link mapping [message #162200] |
Fri, 23 November 2007 08: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 #162611 is a reply to message #162200] |
Sun, 25 November 2007 20:00 |
Eclipse User |
|
|
|
Originally posted by: manja.wolf.web.de
Hello,
I solved the problem. For others who has the same problem a bit
oblongness explanation:
The key for the solution was in the .ecore model. In object A there are
two objects B and C which are references to the same class D. What I
want is to show two subgraphs (B and C each of type D). These subgraphs
are included in object A.
First I defined it in the .ecore model in those way:
A
- B : D
- C : D
D
The problem was, that the two child references in the .gmfmap didn't
work correct. Only the first object in the graphical representation was
shown.
The .gmfmap was in that way:
top node reference A
- child reference B : D
- child reference c : D
This don't work.
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
I hope this don't confuse.
The .ecore looks now a bit ugly for me. Is this requirement a feature or
a bug? Or is there anything I missunderstood completely until now?
inquiring
Manja
|
|
|
Re: parallel child references / link mapping [message #162619 is a reply to message #162611] |
Sun, 25 November 2007 20: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.02439 seconds