Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » edge between elements in an ordered set
edge between elements in an ordered set [message #1793472] Wed, 08 August 2018 19:30 Go to next message
Julien Deantoni is currently offline Julien DeantoniFriend
Messages: 45
Registered: July 2009
Member
Hi,

I have instances of type X, which are represented as a square node.
I have an ordered set of X.
I would like to create and edge between each consecutive instances of X in the ordered set.

Is there any way to do that ? I tried but without success...
thanks in advance
Re: edge between elements in an ordered set [message #1793564 is a reply to message #1793472] Fri, 10 August 2018 08:59 Go to previous messageGo to next message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 430
Registered: July 2009
Senior Member
Hi,
you should be able to do that by using a Relation Based Edge and then using a query with "siblings" to retrieve the target element. Something like "aql:self.followingSiblings()->first()"

You might want to restrict to a specific feature using a query similar to this one (used in the case of the eClassifiers containment reference): "aql:self.followingSiblings()->select( s | s.eContainingFeature().name = 'eClassifiers')->first()"


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Re: edge between elements in an ordered set [message #1793566 is a reply to message #1793472] Fri, 10 August 2018 09:35 Go to previous messageGo to next message
Julien Dupont is currently offline Julien DupontFriend
Messages: 130
Registered: July 2009
Senior Member
Dear Julien,

To do this, you should use a Relation Based Edge.
In the Target Finder Expression you should use a Java service to retrieve the consecutives instances of X.

Regards,
Re: edge between elements in an ordered set [message #1793571 is a reply to message #1793566] Fri, 10 August 2018 11:06 Go to previous message
Julien Deantoni is currently offline Julien DeantoniFriend
Messages: 45
Registered: July 2009
Member
Hi,

I tried the proposition of Cedric and it works like a charm !
Thanks a lot to both of you !

j
Previous Topic:Delete multiple elements that are selected by using Java Service
Next Topic:Overriding default layer tools in extension viewpoint
Goto Forum:
  


Current Time: Sun Nov 18 16:24:13 GMT 2018

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

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

Back to the top