|
|
|
Re: How to check Ecore type of element using AQL? [message #1841274 is a reply to message #1841271] |
Mon, 10 May 2021 11:31  |
Eclipse User |
|
|
|
Thomas Chiang wrote on Mon, 10 May 2021 15:00
A follow up question to this now is how do I check a boolean attribute of said class. If it was self I could just type feature:check but since I am trying to check the target node for the feature I am assuming that it would be something along the lines of aql:target.feature.check but there isn't an option for that. How do I access the attributes of a target node in an if statement like that?
Assumed that you have "yourVariable" which is an instance of a class with a [0,1 ] Reference called "target", which leads to a class with a EBoolean attribute called "yourBooleanProperty":
aql:yourVariable.target.yourBooleanProperty
if by "there isn't an option" you mean that the autocomplete does not fill it in, you can use:
yourVariable.oclAsType(namespace::yourClassWithTarget).target.yourBooleanProperty
(and you can use oclAsType also after target, if needed).
|
|
|
Powered by
FUDForum. Page generated in 0.04122 seconds