| Displaying Model Elements of "foreign" models [message #184423] |
Sun, 27 April 2008 07:36  |
Eclipse User |
|
|
|
Originally posted by: rwoerz.i3.informatik.rwth-aachen.de
As far as I've learned a CANVAS MAPPING (in gmfmap) is mandatory for every
GMF diagram definition. Within a CANVAS MAPPING you have to set a meta
model element <<R>>, which is typically the root of a containment
hierarchy. Instances of those meta model elements, which are part of this
containment hierarchy (i.e., descendants of <<R>>), can be displayed and
edited in the respective RDiagram.
Suppose we have a meta model element <<AModel>> that has a meta
containment reference to a meta model element <<A>>. If you set DOMAIN
ELEMENT in a CANVAS MAPPING to <<AModel>>, then you can eventually display
and create model elements (instances) of type <<A>> in your ADiagram.
Further suppose we have a meta model element <<BModel>> with a meta
containment reference to a meta model element <<B>>. Furthermore, <<B>>
has a meta reference to <<A>>. Analogously, there is a CANVAS MAPPING with
DOMAIN ELEMENT set to <<BModel>>.
Now my question:
Is it possible to display ANodes within a BDiagram although A-elements are
not contained in the respective BModel-element?
This would be useful in order to visually reflect a reference of some
B-element to some A-element in the BDiagram. Just displaying existing
A-elements in BDiagrams would suffice for me, i.e., I do not want to
_create_ A-elements in BDiagrams.
|
|
|
|
|
|
|
| Re: Displaying Model Elements of "foreign" models [message #184666 is a reply to message #184603] |
Tue, 29 April 2008 06:47  |
Eclipse User |
|
|
|
Hello René W.,
Do you have corresponding GenLink created in .gmfgen model file? AFAI can
see from the code GenLink should be always created for each LinkMapping (DiagramGenModelTransformer.process(LinkMapping
lme)) and corresponding CreationCommand class generated (Generator.customRun()
-> myDiagram.getLinks() processing).
So, I suggest you to debug corresponding GMF code, but first check if corresponding
GenLink instance was created by .gmfmap -> .gmfgen transformation.
-----------------
Alex Shatalin
|
|
|
Powered by
FUDForum. Page generated in 0.04563 seconds