[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2m] Re: succesive "collect"

Hello,

In fact, collect() will return a Sequence of Sequences. So to iterate over all elements, despite the fact that they are contained by sub sequences, you have to call the flatten() function first (see http://wiki.eclipse.org/ATL/User_Guide#Sequence_data_type_operations for details).

e.g. in your case:

classes <- DSLC!StructureElement.allInstances()
-> collect(e|e.chapiter) -> flatten()
-> collect(c | thisModule.SE2C(c) )

Best regards,

William

debutante a écrit :
Good afternoon,

can we applicate two succesive "collect" like this

"classes <- DSLC!StructureElement.allInstances()->collect(e|e.chapiter='true')->collect(c | thisModule.SE2C(c) )"

thank you