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: 28
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: 172
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 messageGo to next message
Ewoud Werkman is currently offline Ewoud WerkmanFriend
Messages: 28
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
Re: AQL oclIsKindOf not working [message #1830047 is a reply to message #1793614] Thu, 16 July 2020 09:38 Go to previous message
justine brun is currently offline justine brunFriend
Messages: 1
Registered: July 2020
Junior Member
Maybe you haven't declare the required metamodels (those that declare the types used by the modeling tool).

Just open the MANIFEST.MF file of your project and add the plug-in that defines the metamodels (here: org.eclipse.sirius.sample.basicfamily) in the list of the Required Plug-ins (in the Dependencies tab).

https://wiki.eclipse.org/Sirius/Tutorials/StarterTutorial
Previous Topic:Can I drag a element from a view and drop it in DDiagramEditor to create a new EObject ?
Next Topic:Programmatically set the positon of diagram element and set the diagram layout
Goto Forum:
  


Current Time: Fri Mar 29 01:17:08 GMT 2024

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

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

Back to the top