Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo 3.1] Compilation error
[Acceleo 3.1] Compilation error [message #724934] Tue, 13 September 2011 14:16 Go to next message
Sergio  is currently offline Sergio Friend
Messages: 21
Registered: August 2010
Location: Cardedeu
Junior Member
Hi,

I have the next code with no problem in acceleo 3.0.*, but with compilation errors in 3.1

[query public listOfParametersIn(c : Class) : Bag(Parameter) =  c.ownedOperation -> ownedParameter->select(p : Parameter | p.direction <> ParameterDirectionKind::return) -> asBag()/]


Quote:
The compilation error: 2:18:2:19 "-" expected instead of "->"


How can this be done the right way?

Thank you!!



Sergio Sacristán
http://s2o-bcn.blogspot.com/
Re: [Acceleo 3.1] Compilation error [message #725184 is a reply to message #724934] Wed, 14 September 2011 07:26 Go to previous message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 458
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi,

You have written "c.ownedOperation -> ownedParameter", but ownedParameter is not an attribute of a collection (I don't remember if "ownedOperation" returns a set, a bag, a sequence or an orderedset). You should try:

[query public listOfParametersIn(c : Class) : Bag(Parameter) =  c.ownedOperation -> collect(o: Operation | o.ownedParameter)->select(p : Parameter | p.direction <> ParameterDirectionKind::return) -> asBag()/]


or

[query public listOfParametersIn(c : Class) : Bag(Parameter) =  c.ownedOperation.ownedParameter->select(p : Parameter | p.direction <> ParameterDirectionKind::return) -> asBag()/]


Regards,

Stephane Begaudeau, Obeo

--
Twitter: @sbegaudeau
Google+: stephane.begaudeau
Blog: http://stephanebegaudeau.tumblr.com
Acceleo Documentation: http://docs.obeonetwork.com/acceleo
Previous Topic:IOException with exported Acceleo project [resolved]
Next Topic:[Xpand] dynamic EXPAND statement
Goto Forum:
  


Current Time: Tue Apr 23 16:44:05 GMT 2024

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

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

Back to the top