Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » AQL oclIsKindOf not working(Checking if a class belongs to a supertype does not work in AQL, but works in Acceleo)
AQL oclIsKindOf not working [message #1793572] Fri, 10 August 2018 11:27 Go to next message
Ewoud Werkman is currently offline Ewoud WerkmanFriend
Messages: 8
Registered: January 2018
Junior Member
Hi all,

I'm trying to check if a class is a subclass of another type for style customization.
I use the expression:
aql:self.oclIsKindOf(ns::SuperType)


But this doesn't work.
If I change it to Acceleo syntax it works:
[ self.oclIsKindOf(ns::SuperType) /] 


What am I doing wrong?

Ewoud

[Updated on: Sun, 12 August 2018 10:03]

Report message to a moderator

Re: AQL oclIsKindOf not working [message #1793576 is a reply to message #1793572] Fri, 10 August 2018 12:44 Go to previous messageGo to next message
Julien Dupont is currently offline Julien DupontFriend
Messages: 129
Registered: July 2009
Senior Member
Hi Ewoud,

In the .odesign file, did you add the metamodel in the tab metamodel of the representation?

Regards,

[Updated on: Fri, 10 August 2018 12:45]

Report message to a moderator

Re: AQL oclIsKindOf not working [message #1793614 is a reply to message #1793576] Sat, 11 August 2018 19:07 Go to previous message
Ewoud Werkman is currently offline Ewoud WerkmanFriend
Messages: 8
Registered: January 2018
Junior Member
Hi Julian,

Yes, the metamodel is added to the .odesign
All other aql queries work, except when I use oclIsTypeOf().
This is also the case when using the interpreter (changing self to self.target). It shows that the return type is a Boolean, but always returns false. Using Acceleo's square bracket syntax works, but adds additional dependencies to my project.

Am I missing a specific dependency? Other than default available when using EMF + Sirius specifier?

Ewoud
Previous Topic:How is BPMN-Designer related to Sirius/ObeoNetwork/BPMN2 Modeler
Next Topic:Drag and drop
Goto Forum:
  


Current Time: Fri Sep 21 13:44:25 GMT 2018

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

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

Back to the top