Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 18:43 Go to next message
Leonardo Kenji Shikida is currently offline Leonardo Kenji ShikidaFriend
Messages: 37
Registered: July 2009
Member
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 18:49]

Report message to a 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 19:00 Go to previous messageGo to next message
Leonardo Kenji Shikida is currently offline Leonardo Kenji ShikidaFriend
Messages: 37
Registered: July 2009
Member
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 07:51 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1639
Registered: July 2009
Senior Member
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: Fri Dec 19 04:03:02 GMT 2014

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

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