Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Defining queries in AQL?
Defining queries in AQL? [message #1714049] Mon, 09 November 2015 14:51 Go to next message
Wilbert Alberts is currently offline Wilbert AlbertsFriend
Messages: 209
Registered: June 2010
Senior Member
Hi,

I did some steps in migrating the acceleo services in an editor to AQL.

In general that process went rather smooth. However I encountered one situation where I saw an advantage of the Acceleo services over (the current implementation of) AQL.

In order to represent attributes of a class like concept, I created an Acceleo query providing the textual representing. However, that representation could become rather complex which resulted into decomposing the query into multiple ones.

Example:
[query public getRepresentation(c : MultiplicityConstant) : String = 
c.name + ' = ' + c.value.getExprRepr()
/]

[query public getExprRepr(e: Expression) : String = 
if (e=null) or (e.oclIsUndefined())
then
    'undefined'
else
    if e.oclIsTypeOf(IntegerLiteral) 
        ...
    endif
endif
/]


Then I invoke getRepresentation() from my VSP.

If I would like to do things like this using AQL, I need the ability to define AQL modules that contain queries like described above.

Are there any plans to support something like this?

Greetings,
Wilbert.

Re: Defining queries in AQL? [message #1714142 is a reply to message #1714049] Tue, 10 November 2015 08:45 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
Hi Wilbert,

The purpose of AQL is to provide a "lightweight" Query Language for
interpreted expressions. AQL is a sub-part of Acceleo project and is not
intended to replace it as a Model To Text implementation.
For really complex queries, I recommend you to delegate the job to an
external java service.

Regards,

--
Florian - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Defining queries in AQL? [message #1714186 is a reply to message #1714142] Tue, 10 November 2015 14:57 Go to previous message
Wilbert Alberts is currently offline Wilbert AlbertsFriend
Messages: 209
Registered: June 2010
Senior Member
Hi Florian,

Thanks for your answer. I understand the positioning of AQL a little bit better now. Still I appreciate the ability to express certain queries in OCL over the ability to code them into java. Luckily that remains possible (for the time being).

Greetings,
Wilbert.
Previous Topic:How to forbid two views with same name in the same project ?
Next Topic:Programmatically Opening Diagram Errors
Goto Forum:
  


Current Time: Tue Apr 23 09:16:53 GMT 2024

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

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

Back to the top