How to access other instances in Sirius while defining semantic constraint ? [message #1806596] |
Sat, 11 May 2019 05:29  |
Eclipse User |
|
|
|
In Sirius when i am trying to add semantic contraint for my DSL.
I have to class'es which are connected to root element named "System".
I have two sub classes named "Tag" and "Platform".
I try to add validation rule for DSL. For example the Tag has Distance attribute. I can access it using "aql: self.distance <50" when in graphical editor if user inputs more than 50, error message is given.
Platform has EBoolean attribute named "Indoor" (by the way only and only if 1 Platform object can exist in the system).
What i want to do is "if indoor is true and distance is 50 show error "A" or if indoor is false and distance is 120 show error "B". I can arrange that self.Distance <50 or <120. However, i need to access the instance of Platform and its attribute Eboolean type Indoor.
I tried something like this. " aql: System::Platform.indoor=true and self.distance<120" it did not give any error however System::Platform.indoor did not return any result "false" or "true" just null.
How i can solve this?
Thanks for your help.
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03760 seconds