Specifying sub-graphs using containers [message #1842072] |
Tue, 08 June 2021 13:00 |
Aron S Messages: 4 Registered: June 2021 |
Junior Member |
|
|
Hey,
I have a meta-model (see uploaded image) representing a kind of graph, which allows to create sub-graphs (partialGraphs). To model those sub-graphs in Sirius my first idea was to use Containers, using Nodes for the nodes of the sub-graph. Is there a way to represent the arcs as Edges inside of a Container? At the top level im using Elemenet Based Edges, which are working fine.
At the specifier manual there are pictures of a container containing nodes and edges (e.g. https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#containers --> container styles --> parallelogram) but i could not figure out how to create them.
Any help would be appreciated. Thanks!
[Updated on: Tue, 08 June 2021 14:44] Report message to a moderator
|
|
|
Re: Specifying sub-graphs using containers [message #1842159 is a reply to message #1842072] |
Thu, 10 June 2021 15:53 |
|
Hi Aron,
All edge mapping have to be created as children of a layer. The resulting edges are not "contained" by each container level nor layouted in a container, you can consider that there are drawn on a specific connection layer.
The fact to draw an edge in a contains will come from the nodes to which an edge will be linked.
If you want to represent your Graph and partials Graphs as a recursive structure and avoid to have to create the same depth of mappings than the one you want to represent, you can create a ContainerMapping for Graph, the semantic candidates expression should be something like aql:self.eContents(). (find the first level of Graph element from the element on which you have created your diagram.).
Then you can use the advanced tab and indicates that the mapping will reuse itself, you have to be sure that the semantic candidates expression is compatible and allows to retrieve the direct content or the next level to display on each call.
To display nodes inside a container mapping, you can create sub nodes or sub containers inside it, right clic the mapping and the possible options. Then you will have to play with the semantic candidates expressions and domain class to choose the elements to rperesent.
You might find some partial solutions on how to create the containers and their children in https://www.eclipse.org/sirius/getstarted.html
Regards
What is the concept which will contain all your elements as the resource root ? For the moment your EMF resource will contain Arc elements and Node elements as roots of the resource.
Maxime Porhel - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Powered by
FUDForum. Page generated in 0.03543 seconds