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.
Build: NetBeans IDE Dev (Build 200808120201) VM: Java HotSpot(TM) Client VM, 10.0-b23, Java(TM) SE Runtime Environment, 1.6.0_07-b06 OS: Windows XP, 5.1, x86 User Comments: Right-click on folder grails-app/jobs then selecting New > Other > Empty file and added StatisticsJob.groovy (I cannot add a Groovy Class in that folder due to limitations in New Groovy Class Wizard) The Groovy class was added but I got this exception immediately after. Stacktrace: javax.swing.text.BadLocationException: Length must be positive at javax.swing.text.AbstractDocument.getText(AbstractDocument.java:755) at org.netbeans.modules.groovy.editor.AstPath.<init>(AstPath.java:83) at org.netbeans.modules.groovy.editor.parser.GroovyOccurrencesFinder.run(GroovyOccurrencesFinder.java:121) at org.netbeans.modules.groovy.editor.parser.GroovyOccurrencesFinder.run(GroovyOccurrencesFinder.java:70) at org.netbeans.modules.gsfret.editor.semantic.MarkOccurrencesHighlighter.processImpl(MarkOccurrencesHighlighter.java:173) at org.netbeans.modules.gsfret.editor.semantic.MarkOccurrencesHighlighter.run(MarkOccurrencesHighlighter.java:113)
Created attachment 67190 [details] stacktrace
Most probably due to that an empty file was created. But the New Groovy Class menu item is not visible in grails-app/jobs folder, so I had to create the file this stupid way. I think New Groovy Class and New Groovy Script should be default on unknown grails folders.
Just yesterday I pushed fix for this BLE and also possibility to create Groovy class in any of the project source roots.