Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » [acceleo] how to return a List (or array or whatever) from an query
[acceleo] how to return a List (or array or whatever) from an query [message #727263] Tue, 20 September 2011 14:43 Go to next message
Eclipse UserFriend
Hi

is it possible to return a list of elements from a query statement?

[query public xxx(aYYY:YYY) : Sequence
= invoke('myClassThatReturnsAList',
'xxx(YYY)', Sequence{aYYY}) /]

if I have something like

public List xxx(yyy){
return new ArrayList();
}

?

I am sorry asking this, sounds like a stupid question, but in the MOF M2T document, section 8.2, the BNF of the language syntax describes the return type of a query as a <typeCS>, where typeCS isn´t described anywhere I could find Sad

TIA

Kenji

[Updated on: Tue, 20 September 2011 14:49] by Moderator

Re: [acceleo] how to return a List (or array or whatever) from an query [message #727275 is a reply to message #727263] Tue, 20 September 2011 15:00 Go to previous messageGo to next message
Eclipse UserFriend
I´ve figured out myself.

Just return Sequence(String)

TIA

Kenji
Re: [acceleo] how to return a List (or array or whatever) from an query [message #729434 is a reply to message #727275] Mon, 26 September 2011 03:51 Go to previous message
Eclipse UserFriend
Hi Kenji,

You did figure this out, but for future reference, the examples and help we ship along with Acceleo might be better sources of answers for such questions Smile.

Laurent Goubet
Obeo
Previous Topic:[Acceleo 3.1] Problem with identifiers of protected
Next Topic:[ACCELEO 3] Retrieving the class from a stereotype
Goto Forum:
  


Current Time: Tue Jul 22 17:42:09 EDT 2025

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

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

Back to the top