Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Re: EGL question
Re: EGL question [message #588410] Tue, 20 April 2010 11:34
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Steffen,

Good to hear from you. I hope you're well.

There's not support for sequence separation characters for loops, but
there is the EolCollection#concat method. In this case, the following
should do what you want:

[%=class.extends.concat(',');%]

Cheers,
Louis.


Steffen Zschaler wrote:
> Hi Louis,
>
> Does EGL provide support for sequence separation characters in for
> loops? For example, in generating an extends clause, could I write
> something like
>
> [%for (sc in class.extends; separator=',') {%]
> [%=sc.name%]
> [%}%]
>
>
> instead of having to keep writing this:
>
> [%first := true;
> for (sc in class.extends) {
> if (first)
> first := false
> else
> out.print (',');
> %]
> [%=sc.name%]
> [%}%]
>
>
> Cheers,
>
> Steffen
>
> --
> Dr. rer. nat. Steffen Zschaler
> Marie Curie Fellow
>
> Lancaster University
> Lancaster, United Kingdom
>
> Email szschaler@acm.org
> Phone +44 (01524) 510354
> WWW http://www.steffen-zschaler.de/
>
Previous Topic:EGL execution error
Next Topic:Re: EGL question
Goto Forum:
  


Current Time: Thu Aug 21 08:11:51 EDT 2014

Powered by FUDForum. Page generated in 0.01975 seconds