[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2t] Re: How include objects into new set

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 écrit :
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]



begin:vcard
fn:Laurent Goubet
n:Goubet;Laurent
org:<a href="http://www.obeo.fr/";>Obeo</a>
email;internet:laurent.goubet@xxxxxxx
url:http://www.obeo.fr
version:2.1
end:vcard