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]
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.