Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Edge creation for several relations
Edge creation for several relations [message #1794902] Mon, 10 September 2018 16:06 Go to next message
Florian Kunz is currently offline Florian KunzFriend
Messages: 1
Registered: September 2018
Junior Member
Hello,

I am new to sirius and I have just started my first project. I worked through the Sirius tutorials, where I learned to create Relation Based Edges. Now I have three questions for my own project:


    Is there a way to make one edge creator for several relations instead of one edge creator for each relation?
    Let's say I have 3 classes: A, B and C. There is a relation between A and B and another relation between A and C. Right now, I have to create two edge creators, one for each relation. Because of that the toolbar is pretty crowded.


    Further I am looking for a way to create bi directional relations. Because in my ecore model there are a lot of those and when I model it with sirius I get two edges instead of one with two "heads".


    And finally, I would like to know, if it is possible to highlight nodes and edges from code. Because in my project I am looking for certain patterns with Henshin but when they are found I can only use the console to inform the user. An ideal solution would be colouring the nodes in a new colour.


I would really appreciate some help.

Regards
Florian
Re: Edge creation for several relations [message #1794997 is a reply to message #1794902] Wed, 12 September 2018 11:23 Go to previous message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 194
Registered: August 2010
Senior Member
Hi Florian,

A single edge creation tool can reference multiple Edge mappings and can be applied on several relations. You have to handle the different use cases in the tool "begin" operation with "If" conditions to create the right relation according to the selected source and target elements.
For be-directional edges you have a good example in the org.eclipse.sirius.sample.ecore.design plugins available if you install the Sirius Sample feature from the Sirius update site (http://www.eclipse.org/sirius/download.html). You can next import the plugin in your workspace and take a look at the odesign file.
Node and edges can have conditional styles to apply a different style according to a predicate expression. In this expression you can call a Java service for advanced testing.
For documentation see https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#conditional_styles and https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#edge_tools.

Regards,

Florian
Previous Topic:Facing Problems While creating delete line tool in Sirius Table representation
Next Topic:How to Highlight all references to an object in a Sirius Diagram
Goto Forum:
  


Current Time: Wed Sep 19 09:00:09 GMT 2018

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

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

Back to the top