Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Two different representations of the same relationship(I do not know how to associate one representation of a relationship only to each relationship instance on the diagram)
Two different representations of the same relationship [message #1776478] Thu, 16 November 2017 18:56 Go to next message
graph researcher is currently offline graph researcherFriend
Messages: 8
Registered: March 2017
Junior Member
Is it possible in Sirius 5.0 to have two different representations of the same relationship at the same time? The relationship has it's own class in the eCore meta-model. I am asking this question, because for each pair of node classes in the model diagram both representations are displayed. When I delete one of them on the model diagram for a particular nodes pair the second is also deleted from the diagram. What should I do to separate them and to achieve the following goals:
- have two different representations of the same relationship having one meta-model class
- have two different tools in tool palette one for each relationship representation
- associate information about the tool used for creating an association on the diagram with the association on the diagram (for correct presentation and for diagram persistence provisioning)

My case-study is dedicated to N-ary associations. And I have the following tools:
a) createNode [a UML class rectangle]
b) createArc [a UML N-ary relationship diamond]
c) createNode2Arc [an edge from a Node to an Arc]
d) createArc2Node [an edge from an Arc to a Node]
e) createNode2Node [an edge from a Node to a Node]
And I would like to be able to draw one of two variants only of the same binary case of the N-ary relationship for a particular pair of Nodes:
- c+d (displayed as an edge crossing the diamond)
- e (displayed just as an edge)

I may provide more detailed information if needed.
Re: Two different representations of the same relationship [message #1776512 is a reply to message #1776478] Fri, 17 November 2017 08:17 Go to previous messageGo to next message
graph researcher is currently offline graph researcherFriend
Messages: 8
Registered: March 2017
Junior Member
Some illustrative files:
- eCore meta-model (must remain unchanged) [naryonlyMM.png]
- Sirius (Obeo Designer Community 10.0) model diagram [naryonlyM.png]
- modeler design specification file [arityonly.odesign]
are attached now to describe the problem I have better.

I would like to decide if I join two Nodes with grey or with blue edges representing the meta-model Arc class.

Please, do not ask me to change the meta-model. It should be enough to query the meta-model with AQL to refer to the right meta-model elements required by Sirius modeler. Which one, how and how to block the relationship duplication (grey+blue) on the diagram?

[Updated on: Fri, 17 November 2017 09:13]

Report message to a moderator

Re: Two different representations of the same relationship [message #1776522 is a reply to message #1776512] Fri, 17 November 2017 09:26 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
Hello,

Yes on a representation description, you can add as many mapping representing the same semantic elements as you need.
If you want to use different tools to select which mapping(s) should be use to represent an element then you will need to set the representation description to "Not Synchronized" (see the Synchronization part in https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#graphical_elements). This mean that you control which semantic element should be represented and that your creation tools should include "Create View" model operations in order to display the element added in your semantic model. In the same spirit, your delete tool should only process a "Delete View" model operation if you just want to delete the graphical representation of an element. Note that in the contextual menu, you have "delete from diagram" and "delete from model" actions by default.

I think you should have a look to EcoreTools and UML Designer viewpoint specification models, you should find some examples that will help you.

Regards,
Steve


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Two different representations of the same relationship [message #1776555 is a reply to message #1776522] Fri, 17 November 2017 16:20 Go to previous message
graph researcher is currently offline graph researcherFriend
Messages: 8
Registered: March 2017
Junior Member
Thank you for your immediate answer :)
I will study the documentation and perform some experiments.
Piotr
Previous Topic:Button in Tool Section only to trigger external java action
Next Topic:Diagram extension question
Goto Forum:
  


Current Time: Wed Apr 24 15:49:27 GMT 2024

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

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

Back to the top