Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [ACCELEO] call Query interpreter programmatically
[ACCELEO] call Query interpreter programmatically [message #1709824] Thu, 01 October 2015 11:52 Go to next message
Vincent De Bry is currently offline Vincent De BryFriend
Messages: 55
Registered: May 2013
Member
Hi,

Lets consider I have a string representing an Acceleo 3 expression which has been written in a classic SWT Text field (typically in a preference page) .
I'd like to evaluate the results of this expression and manage the results programmatically.

I've taken a look at InterpreterView in org.eclipse.acceleo.ui.interpreter, but many methods are protected. Is it existing a simple class to which I could pass my String and get a Collection of EObjects as a result ?

Other connex subject: What I I would like to have the completion support for my expression in my Text widget ?

What part of existing code could be the correct entry point to these purposes ?

Thanks.
Re: [ACCELEO] call Query interpreter programmatically [message #1710006 is a reply to message #1709824] Fri, 02 October 2015 15:21 Go to previous messageGo to next message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 451
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi,

For this need, you should use our new interpreter engine (AQL). It is way lighter, it is faster, it has less dependencies that the original engine and it comes with additional features and a better API. For your need, you should have a look at this test case showing how to build an expression and evaluate it.

If you want to have some validation of the expression, have a look at the result of the builder.build(...). Finally, if you some code completion, you can use our completion engine by having a look here. You just need to plug the code used in the test to the SWT content assist APIs.

Regards,

Stephane B├ęgaudeau, Obeo



Re: [ACCELEO] call Query interpreter programmatically [message #1710269 is a reply to message #1710006] Mon, 05 October 2015 15:44 Go to previous message
Vincent De Bry is currently offline Vincent De BryFriend
Messages: 55
Registered: May 2013
Member
Hi Stephane,
Thank you for this tip. It sounds quite good and I see how I should do with the last Acceleo's release.
But, in my development environment, I am constrained to use Acceleo 3.5.0. Was there the same possibility with this version ?
Previous Topic:[ACCELEO] Maven generate Standalone not able to access applied profile
Next Topic:[Acceleo] Generate package with same order as the UML editor
Goto Forum:
  


Current Time: Tue Oct 16 03:51:16 GMT 2018

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

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

Back to the top