Skip to main content



      Home
Home » Eclipse Projects » Sirius » Show only parent nodes.
Show only parent nodes. [message #1804450] Tue, 26 March 2019 06:36 Go to next message
Eclipse UserFriend
Hi,

in the follwing the metamodel constellation is documented:

http://prntscr.com/n32fnd

http://prntscr.com/n32fnd

To get all the Processes:
aql: self.process


Now, I want to show all node, which don't have a parent Process. Here is my approach, which does not work. Please correct me.

aql: self.process -> select(myProcess | myProcess.eInverse(subProcesses) -> size = 0)


Thank you,
Bushra

[Updated on: Tue, 26 March 2019 09:12] by Moderator

Re: Show only parent nodes. [message #1804476 is a reply to message #1804450] Tue, 26 March 2019 10:28 Go to previous message
Eclipse UserFriend
Hi Bushra,

The AQL documentation can be found here: https://www.eclipse.org/acceleo/documentation/

There are several eInverse method with or without parameters:
- eInverse() (no parameter) : returns any element which as a relationship with the current one
- eInverse(packageName::EClassName) : returns only instances of the given type.
- eInverse('featureName') : more explicit and query for a specific reference name

Please also note that
- -> isEmpty is equivalent to -> size() = 0
- the opposites would be myEelement.ref1.ref2 -> size() <> 0 or not (myElement.ref1.ref2 -> isEmpty())

In your case, you should try:
aql: self.process -> select(myProcess | myProcess.eInverse('subProcesses') -> isEmpty())


Regards,
Previous Topic:Integrating sirius into xtext
Next Topic:Automatic creation diagram
Goto Forum:
  


Current Time: Sat Jul 12 15:52:59 EDT 2025

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

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

Back to the top