Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Specifying sub-graphs using containers(Is it possible to specify Element Based Edges inside of Containers?)
Specifying sub-graphs using containers [message #1842072] Tue, 08 June 2021 13:00 Go to next message
Aron S is currently offline Aron SFriend
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.

index.php/fa/40594/0/

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 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
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
Re: Specifying sub-graphs using containers [message #1842370 is a reply to message #1842159] Thu, 17 June 2021 09:49 Go to previous message
Aron S is currently offline Aron SFriend
Messages: 4
Registered: June 2021
Junior Member
Hi Maxime,
thanks for the reply!

The root is an instance from the Graph class containing the Nodes and Arcs. I have made a mistake in the graphical representation of the meta model in the image above! Sorry about that.

But I managed to figure it out.
One of the Errors was the inappropriate semantic candidate expression for the arc mapping. Instead of aql:self.arcs i switched to aql:self.partialGrafphs.arcs + self.arcs.
The node mappings are modeled in the same layer as the container mappings and are referenced in the container using the import tab - Reuse Node Mappings. I dont think a recursive structure you mentioned is nessesary in my case, bacause i only want to have a singe recursion.

Regards!
Previous Topic:Bordered Container
Next Topic:Installing Sirius 6.5.1 on Eclipse 2021-06 Modeling fails
Goto Forum:
  


Current Time: Fri Mar 29 08:43:39 GMT 2024

Powered by FUDForum. Page generated in 0.03543 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top