Re: Passing arrays to annotations

111 views
Skip to first unread message

Sven Efftinge

unread,
Apr 17, 2013, 10:45:19 AM4/17/13
to xtend...@googlegroups.com
arrays are created using the list literal syntax

@ComposedChecks(validators = #[ typeof(Test),typeof(Test2) ] )


On Apr 17, 2013, at 4:15 PM, oliver_...@gmx.de wrote:

Hi,

looks like with Xtend 2.4 the syntax to pass arrays to annotations has changed. Example:
package test

import org.eclipse.xtext.validation.AbstractDeclarativeValidator
import org.eclipse.xtext.validation.ComposedChecks

@ComposedChecks(
    validators =
        {typeof(Test), typeof(Test)}
)
class Test extends AbstractDeclarativeValidator {
   
}


this worked with Xtend 2.3.1, but in 2.4.0 I get an parser error as '{' is not allowed.

How do I have to define this? Or is it a bug?

Kind regards
Oliver

--
You received this message because you are subscribed to the Google Groups "Xtend Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xtend-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Message has been deleted
Message has been deleted
Message has been deleted

Sebastian Zarnekow

unread,
Apr 17, 2013, 11:35:50 AM4/17/13
to xtend...@googlegroups.com
A feature request is welcome.

Regards,
Sebastian


On 17.04.2013, at 17:34, oliver_...@gmx.de wrote:

> Thanks, Sven.
>
> Content assist could be improved I think. The hash has not been recommended, if I remember correctly.
>
> A template proposal like "Create an array literal" would be even better. Any activities planned in this way. Is it worth opening a feature request?
Reply all
Reply to author
Forward
0 new messages