Skip to main content



      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 07:27 Go to next message
Eclipse UserFriend
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 06:03] by Moderator

Re: AQL oclIsKindOf not working [message #1793576 is a reply to message #1793572] Fri, 10 August 2018 08:44 Go to previous messageGo to next message
Eclipse UserFriend
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 08:45] by Moderator

Re: AQL oclIsKindOf not working [message #1793614 is a reply to message #1793576] Sat, 11 August 2018 15:07 Go to previous messageGo to next message
Eclipse UserFriend
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 05:38 Go to previous message
Eclipse UserFriend
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: Thu Jun 12 09:34:42 EDT 2025

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

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

Back to the top