Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Help with Element Based Edge
Help with Element Based Edge [message #1852609] Fri, 27 May 2022 02:23 Go to next message
Marcos Alves Vieira is currently offline Marcos Alves VieiraFriend
Messages: 8
Registered: December 2015
Junior Member

I'm a beginner with Sirius and I can't figure it out how to create an "Element Based Edge".

I was following some video tutorials to create my diagram tool, but none of them cover this feature, limiting themselves to "Relation Based Edges", which I had no problem on creating.

So, I have a quite complex metamodel on which there are some Element Based Edges. I'll post a picture of one of them here and if any of you guys could help me figure it out how to make it work, I think I can follow the process to the other edges.

This is a piece of my metamodel, defining that one Entity can have a WasAttributedTo relation with "n" Agents:


And this is how I was trying to do. I know it's incomplete, but I need help to understand how to access the Entity from the WasAttributedTo class.


Thanks in advance for any help and please accept my apologies for posting a silly question.

Re: Help with Element Based Edge [message #1852677 is a reply to message #1852609] Tue, 31 May 2022 06:54 Go to previous message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 702
Registered: July 2009
Senior Member
Your configuration seems correct, though incomplete.
You need to add:
* "Semantic Candidates Expression": an expression that returns the instances of WasAttributedTo that should be actually displayed on your diagram. It can be all of them, or just a subset based on some criterion, it really depends on what your diagram is designed to show. From your metamodel it seems these are owned by Entity, so probably somehting like "aql:theSameExpressionYouUsedForThePROV_EntityMapping.theNameOfTheContainmentReference"
* "Source Finder Expression" and "Target Finder Expression": given one instance of WasAttributedTo returned from the previous expression, how does Sirius find which elements the edge should connect? Assuming the source is the Entity and the target is the Agent, the expressions should probably be: aql:self.eContainer and aql:self.agent

Also note that an edge will actually be displayed only if the configured source and target nodes are actually displayed on the diagram. If for some reason the Agent returned by aql:self.agent does not have a corresponding instance of PROV_Agent visible, no edge will be created (it would have nowhere to point to).

Pierre-Charles David - Obeo

Need training or professional services for Sirius?
Previous Topic:Highlight shortest path between two selected nodes
Next Topic:The Space allocated for Label Text Stays SMALL, even if he Font Size is INCREASED. A BUG?
Goto Forum:

Current Time: Sat Apr 13 23:32:54 GMT 2024

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

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

Back to the top