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.

Bug 143685 - [65cat] javax.swing.text.BadLocationException: Length must be positive
Summary: [65cat] javax.swing.text.BadLocationException: Length must be positive
Status: RESOLVED FIXED
Alias: None
Product: groovy
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: martin_adamek
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-12 23:18 UTC by goeh
Modified: 2008-10-30 14:25 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 89308


Attachments
stacktrace (1.34 KB, text/plain)
2008-08-12 23:18 UTC, goeh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description goeh 2008-08-12 23:18:19 UTC
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)
Comment 1 goeh 2008-08-12 23:18:27 UTC
Created attachment 67190 [details]
stacktrace
Comment 2 goeh 2008-08-12 23:23:22 UTC
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.
Comment 3 martin_adamek 2008-08-13 06:47:48 UTC
Just yesterday I pushed fix for this BLE and also possibility to create Groovy class in any of the project source roots.