Visualization of a cross reference [message #1790705] |
Thu, 14 June 2018 16:39 |
Antonio Garmendia Messages: 93 Registered: May 2014 |
Member |
|
|
Hi,
I'm just trying to develop a graphical environment for a meta-model that its structure is similar to the following:
And the expected result should be:
The first problem that I face is the creation of the starting and ending point inside the object C. I would like to know a good way of create such kind of element that has no mapping in the meta-model. What I though in this case is to create a sub node using as a DomainClass: C and it works but maybe is not the best way to do that, there is better way?.
Secondly, I need a representation of objects of type B represented in one way inside the C object and a different style outside of C. I try at first to use Style Customization, but I don't find the way, any hints?
Finally, the creation of edges between the nodes. I try using OCL expression but when a node is referenced by two objects of type C (in the example could be the node: typeB1) Sirius shows duplicated edges.
I can upload the *.odesign with my approach if necessary. Any hint would be appreciated.
Cheers,
Anthony
-
Attachment: mm.png
(Size: 6.54KB, Downloaded 344 times) -
Attachment: diagram.png
(Size: 17.58KB, Downloaded 259 times)
|
|
|
|
|
Re: Visualization of a cross reference [message #1790739 is a reply to message #1790736] |
Fri, 15 June 2018 09:18 |
|
Anthony,
For the first question,
To represent an Object in a representation, it must be mapped to an Object, so you have no alternative to the one you made.This is the best way.
For the seconde question,
You must create two mapping as you have done before. The customization style will be applied to a mapping from a condition. In your case you want to display 2 graphic shapes for the same object, so you have to define 2 mappings as you did.
For the third question,
If I understand your need, you can add a precondition on the precondition of the edge mapping (in tab/Advanced). I enclose the result. If it's your need, the precondition for the 3 edges mapping is:
aql:targetView.eContainer()=sourceView.eContainer()
Regards
|
|
|
|
Powered by
FUDForum. Page generated in 0.02936 seconds