Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » AQL: Recursive selection
AQL: Recursive selection [message #1801518] Mon, 21 January 2019 15:37 Go to next message
Laurens Lang is currently offline Laurens LangFriend
Messages: 3
Registered: March 2018
Junior Member
Hi,

I have an Item with can have properties, which also can have properties.
I tried to get them in an elegant way recursively, but it does not work, but i don't want to use a service, since i will need this scenario quite often. It seems i overlooked a concept.

NAIVE Approach:
aql: self.properties + self.properties.subProperties + self.properties.subProperties.subProperties + self.properties.subProperties.subProperties.subProperties ....


How can i implement this?

Thanks,
Laurens

[Updated on: Wed, 23 January 2019 15:31]

Report message to a moderator

Re: AQL: Recursive selection [message #1801679 is a reply to message #1801518] Thu, 24 January 2019 16:32 Go to previous messageGo to next message
Julien Dupont is currently offline Julien DupontFriend
Messages: 172
Registered: July 2009
Senior Member
Hello Laurens,

Why don't you want to use a Java service?
In which case do you want to do it? Is it in a mapping definition?
Maybe the solution is provided by Sirius and not by AQL. So, to give you the best answer, I need to know your need and in which case Sirius you should use this.

Thanks.

Regards,
Re: AQL: Recursive selection [message #1801931 is a reply to message #1801679] Tue, 29 January 2019 15:23 Go to previous messageGo to next message
Laurens Lang is currently offline Laurens LangFriend
Messages: 3
Registered: March 2018
Junior Member
Thank you for your help so far.

I want to create node for all contained elements in a tree-like diagram.

This seems to be a common use-case, but I miss the concept in the documentation.

Re: AQL: Recursive selection [message #1801937 is a reply to message #1801931] Tue, 29 January 2019 16:02 Go to previous message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
Hello,

I think that in your metaclass, you should add an EOperation getAllProperties. In its implementation you have a recursive method that look for properties, sub-properties etc. This way in your odesign, you will just need to call "aql: self.getAllProperties".

Regards,
Steve


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Edges between contained elements disapear when horizontally stacked containers are moved.
Next Topic:Can Nodes, containers or layers be marked as not movable is Sirius
Goto Forum:
  


Current Time: Tue Apr 23 06:40:51 GMT 2024

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

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

Back to the top