Home Download Buy Blog Forum Support

Invalid java annotation highlighting

Invalid java annotation highlighting

Postby amsemy on Tue Mar 26, 2013 9:58 am

ST2 build 2217

Try this code
Code: Select all
@MyAnnotation(name = "class annotation",
        sub = {
            @MySubAnnotation(name = "sub anotation 1"),
            @MySubAnnotation(name = "sub anotation 2")
        })
public class MyClass {

    @MyAnnotation(name = "class body annotation",
            sub = {
                @MySubAnnotation(name = "sub anotation 1"),
                @MySubAnnotation(name = "sub anotation 2")
            })
    public void myMethod(
            @MyAnnotation(name = "param annotation",
                    sub = {
                        @MySubAnnotation(name = "sub anotation 1"),
                        @MySubAnnotation(name = "sub anotation 2")
                    })
            int param) {
        @MyAnnotation(name = "method body annotation",
                sub = {
                    @MySubAnnotation(name = "sub anotation 1"),
                    @MySubAnnotation(name = "sub anotation 2")
                })
        MyClass variable;
    }

}

@interface MyAnnotation {
    String name();
    MySubAnnotation[] sub();
}

@interface MySubAnnotation {
    String name();
}
Attachments
Java.tmLanguage.zip
Possible solution
(2.92 KiB) Downloaded 68 times
amsemy
 
Posts: 4
Joined: Tue Mar 26, 2013 7:20 am

Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 20 guests