|
Re: Loop in Acceleo [message #1731509 is a reply to message #1731463] |
Fri, 06 May 2016 10:35 |
Eclipse User |
|
|
|
If you only need the first ocurrence, why are you using a loop?
You can directly get a single occurence from a collection using OCL.
El 05/05/2016 a las 19:32, walter arboleda escribió:
> How i can break a loop in acceleo?, i need only one ocurrence of the
> finded element. Or there is other form?
|
|
|
Re: Loop in Acceleo [message #1732589 is a reply to message #1731509] |
Wed, 18 May 2016 11:36 |
|
Hi,
It is not possible to break a loop in Acceleo. You'll have to reduce the list of elements to only those on which you want to iterate beforehand, or as the anonymous poster above mentionned, directly retrieve the one element you want.
For example, [list->first()/] will return the first element of a sequence.
Laurent Goubet
Obeo
|
|
|
Powered by
FUDForum. Page generated in 0.03372 seconds