Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsMapping of a group of instances as a node in a diagram
https://www.eclipse.org/forums/index.php/mv/msg/1092620/1784843/#msg_1784843
I'm trying to define a diagram of an existing ecore model:
Initially, on the diagram, there was a node for each class instance (A, ABRelation and B), and all relations were displayed.
Now the requirement is not to represent all ABRelation instances, but display aggregations of ABrelation instances (based on their attributes).
I thought of two options:
1. Use one of the ABRelation instances to represent the group
2. Define a derived/transient association to a "derived/transient" class to represent the grouping (hence not changing the serialization of the model)
What would be the best way to achieve this with Sirius?
Thanks for your help and thanks Obeo for your great product!
Yann]]>Yann Andenmatten2018-04-04T17:44:43-00:00Re: Mapping of a group of instances as a node in a diagram
https://www.eclipse.org/forums/index.php/mv/msg/1092620/1784940/#msg_1784940
Yann Andenmatten wrote on Wed, 04 April 2018 19:44
I thought of two options:
1. Use one of the ABRelation instances to represent the group
2. Define a derived/transient association to a "derived/transient" class to represent the grouping (hence not changing the serialization of the model)
I think in this case you can use another approach: create an Relation-Based Edge Mapping from A to B, and in the Target Finder Expression navigate through ABRelation to all the Bs accessible from A. This should create a single edge between each A and B which are connected via ABRelation.
Note that with this approach the semantic element behind the edge will be the source element, i.e. an instance of A. You can associate the ABRelation instances themselves to the edge using the Associated Semantic Elements expression in the Advanced tab of the mapping configuration. This will make the ABRelations visible in the Properties view when the edge is selected so they can be edited (if needed).
]]>Pierre-Charles David2018-04-06T07:32:34-00:00