Displaying Model Elements of "foreign" models [message #184423] |
Sun, 27 April 2008 11: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 #184439 is a reply to message #184431] |
Sun, 27 April 2008 20:52 |
Eclipse User |
|
|
|
Originally posted by: rwoerz.i3.informatik.rwth-aachen.de
> Yes. You have to allow ADiagram elements to be "shortcutted" from
> BDiagram and regenerate both diagram editors. As a result you'll be able
> to add a shortcut to the element from ADiagram onto BDiagram - this will
> be a normal ANode, so you'll be able to draw a link to it.
Thanks for the hint. Now A-shortcuts can be displayed in B-Diagrams.
Now I'm stuck in creating connections from B-Nodes to A-shortcuts. The
diagram editor prohibits these links. Other types of connections from
B-Nodes to B-shortcuts work well.
Are there any restrictions concerning connections from or to shortcuts?
|
|
|
|
Re: Displaying Model Elements of "foreign" models [message #184603 is a reply to message #184492] |
Mon, 28 April 2008 19:00 |
Eclipse User |
|
|
|
Originally posted by: rwoerz.i3.informatik.rwth-aachen.de
> - Define link mapping for B -> A link on diagram B
I did so but the gmfgen-Generator seems to completely ignore this link
mapping. Consequently, there are no corresponding command classes for
creation and reorientation generated into bdiagram.edit.commands.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03754 seconds