Skip to main content



      Home
Home » Eclipse Projects » Sirius » Help with Edge creation tool
Help with Edge creation tool [message #1836052] Fri, 18 December 2020 23:22 Go to next message
Eclipse UserFriend
I'm a student using Sirius for a small research project.
I am trying to create the following diagram using Sirius Desktop, then I will need to deploy it using Sirius Web.
index.php/fa/39576/0/

This is my viewpoint(update it lacked the appropriate relations between concepts)
index.php/fa/39578/0/

Problem: Edge creation tool(connector) is not working, I can't connect the selected elements. I think it is might be because of my meta-model, but I don't know how to fix it.


I have also attached my .odesign file

Please note that I don't have experience with modeling, this is my first time using Sirius.

[Updated on: Wed, 17 March 2021 09:10] by Moderator

Re: Help with Edge creation tool [message #1836130 is a reply to message #1836052] Tue, 22 December 2020 03:13 Go to previous messageGo to next message
Eclipse UserFriend
Indeed. The first problem is with your metamodel. It only includes composition relations, and misses relations between elements. Only after these are established, you can define presentations for them.
I highly recommend doing the basic family tutorial of Sirius (https://wiki.eclipse.org/Sirius/Tutorials/BasicFamily). Specifically, do the "Domain model tutorial" and then the "Starter tutorial". It should not take you more than half a day, and will allow you to do what you need.

Regards,
Avi
Re: Help with Edge creation tool [message #1836169 is a reply to message #1836130] Wed, 23 December 2020 00:15 Go to previous messageGo to next message
Eclipse UserFriend
I did go though BasicFamily and the Mindstorm tutorials, but I it's still not clear the steps required to manually create a generic edge between any two elements.
The example given https://wiki.eclipse.org/Sirius/Tutorials/AdvancedTutorial#Edge_Creation_Tool and the documentation https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#edge_tools did not help.


So, I created the simplest model that I could think of to create an edge:

Metamodel:
index.php/fa/39594/0/

ViewPoint, I'm not sure about the logic of edge creation:
index.php/fa/39595/0/

I don't really know what the value for "Target Finder Expression" should be?
index.php/fa/39596/0/

Set operation:
index.php/fa/39597/0/



Please let me know if you require more information

Thank you

[Updated on: Wed, 23 December 2020 00:53] by Moderator

Re: Help with Edge creation tool [message #1836177 is a reply to message #1836169] Wed, 23 December 2020 04:00 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

As pointed out by Avi, it is not clear one which semantic relation your connector will rely on?
The edge creation tool will allow to create an edge between two elements only if a consistent Edge Mapping exists between those elements. Before defining the edge creation tool, make sure that you are able to display the edge in your diagram.
If I take your second sample metamodel, it seems that you have defined an edge between an element of type A and an element of type B. Make sure that the relation"a" or "b "is properly set in your model and you should see the edge appears. In this case, the edge creation tool will create the semantic relation (by setting the "a" or "b" feature) and the edge will automatically be created according to the edge mapping.

Regards,

Florian
Re: Help with Edge creation tool [message #1836184 is a reply to message #1836177] Wed, 23 December 2020 08:10 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the feedback Florian

Quote:
Before defining the edge creation tool, make sure that you are able to display the edge in your diagram.


I did that, but I had to create two "relation based edge"(and two "edge creation tool")
index.php/fa/39599/0/

But this is not what I wanted, Is it possible to simple do it with one?
  • Attachment: two_edges.png
    (Size: 51.91KB, Downloaded 642 times)
Re: Help with Edge creation tool [message #1836443 is a reply to message #1836184] Mon, 04 January 2021 07:44 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the feedback, I got most of model working.
I managed to get a single tool to represent my two relations(goal and goalRequirement), which works fine, but I'm not sure if that this the correct way to do it?
index.php/fa/39654/0/

index.php/fa/39655/0/

Mike

[Updated on: Wed, 17 March 2021 09:12] by Moderator

Re: Help with Edge creation tool [message #1836600 is a reply to message #1836443] Fri, 08 January 2021 10:23 Go to previous messageGo to next message
Eclipse UserFriend
Hi Mike,

It seems that both goal and goalElements are references "many" and not container. The recommended name should be goals and goalRequirements.
The Set operation in the model will do a "ADD" on the corresponding list.

Are you creating an edge tool which will allows the user to clic on a source Experiment and an existing target GoalRequirement element ?
Is the tool intended to create a Goal element, store it in the model, add it to the source expriment goals and references the target (second clic) element as goalRequirement of the created Goal ?

Regards,



Re: Help with Edge creation tool [message #1836928 is a reply to message #1836600] Mon, 18 January 2021 23:33 Go to previous message
Eclipse UserFriend
Thank Maxime.

I solved my problems after I read EMF and Sirius documentation, I refactored my model, added precondition and other advanced features.

As for the case of "single tool to represent my two relations(goal and goalRequirement)", I created an if statements to take care of each relationship(I think this was the recommend way to do it according to the documentation, I might be wrong though)

[Updated on: Wed, 17 March 2021 09:08] by Moderator

Previous Topic:Edge Creation Depending on Feature of class
Next Topic:How to access Sirius edition table's cell editor from SWTBot?
Goto Forum:
  


Current Time: Mon Jul 07 08:52:44 EDT 2025

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

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

Back to the top