Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » How include objects into new set
How include objects into new set [message #486635] Fri, 18 September 2009 13:33 Go to next message
Omran  is currently offline Omran
Messages: 21
Registered: July 2009
Junior Member
Dears,
Sorry for the previuose message.please consider it as a canceled one.
I want to create empty set then add specific objects to it.
I used the code below but I has some errors.
any help is highly appreciated.

Regards,
Omran



[let ss:Set(ViewColumn)= Set{}]////error1 Invalid Type:Set(ViewColumn)
[for (vc:ViewColumn|mv.columns) ]
[if (vc.oclIsTypeOf(ViewExpColumn))]
[let vec : ViewExpColumn = vc.oclAsType(ViewExpColumn)]
[if not (vec.expression.trim().toUpper().startsWith('SUM(') or
vec.expression.trim().toUpper().startsWith('AVG(') or
vec.expression.trim().toUpper().startsWith('MIN(')or
vec.expression.trim().toUpper().startsWith('MAX') or
vec.expression.trim().toUpper().startsWith('COUNT('))]
[ss->including(vec.oclAsType(ViewColumn))/]///error2 Cannot find
operation (including(ViewColumn)) for the type (Set())
[/if]
[/let]
[/if]
[if (vc.oclIsTypeOf(SimpleViewColumn))]
[ss->including(vc.oclAsType(ViewColumn))/]//error3 Cannot find operation
(including(ViewColumn)) for the type (Set())
[/if]
[/for];
[for (vc:ViewColumn|ss) separator(',')]///error4 The 'no null' constraint
is violated
[vc.name/]
[/for]
[/let]
Re: How include objects into new set [message #486670 is a reply to message #486635] Fri, 18 September 2009 14:57 Go to previous message
Laurent Goubet is currently offline Laurent Goubet
Messages: 1632
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010309010409090307010104
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Omran,

First of all, please add the [Acceleo] prefix when asking questions
about Acceleo on this newsgroup, this will save some trouble to everyone
sorting the posts ;).

"Set(ViewColumn)" was not considered an "OclType" and thus couldn't be
used for variable definitions in Acceleo in previous versions of Acceleo
(or OCL, don't remember how we fixed this) you need to update to the
most recent 0.9 Acceleo builds to fix this (and update to Eclipse 3.5 if
this doesn't do the trick). This should solve all four errors.

Laurent Goubet
Obeo

Omran a
Previous Topic:Check/Xtend: Regular Expression syntax
Next Topic:The xpand/xtend editors do not work for me!
Goto Forum:
  


Current Time: Sat Oct 25 19:48:39 GMT 2014

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

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