This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Advanced Syntax-Highlighting for Groovy Sources using full grammar incl. model.
Syntax Highlighting will be enabled by annotating all AST-nodes using this method: org.netbeans.modules.groovy.editor.parser.GroovySemanticAnalyzer.annotate() At this moment these issues are unfinished compared to Java sourcecode: 1.) Field usage is not highlighted. The declarations are. 2.) Class definitions are not highlighted. 3.) The Class-constructors are not highlighted. 4.) Static classes are not highlighted.
OK, i have a test-driver for the annotate() method and i can debug the stuff: http://www.netbeans.org/source/browse/scripting/groovy/editor/src/org/netbeans/modules/groovy/editor/parser/GroovySemanticAnalyzer.java?r1=1.7&r2=1.8 http://www.netbeans.org/source/browse/scripting/groovy/editor/src/org/netbeans/modules/groovy/editor/AstUtilities.java?r1=1.10&r2=1.11 http://www.netbeans.org/source/browse/scripting/groovy/editor/test/unit/src/org/netbeans/modules/groovy/editor/parser/GroovySemanticAnalyzerTest.java?rev=1.1&view=markup
A little bit more logging, docs and more tests http://hg.netbeans.org/main/contrib/rev/9138912a1f8b
Now we can detect Constructors in Groovy classes. http://hg.netbeans.org/main/contrib/rev/f8366c4fd2e9
Groovy classes are now recognized http://hg.netbeans.org/main/contrib/rev/88ee17d26a25
Done.
v.