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.
I just update my workspace (even also try a clean cvs), I now can't create any project. I got, SEVERE [global] javax.swing.text.BadLocationException: Invalid offset=363, docLength=342 ... And all Java/JSP files created are empty! It happened when creating a simple Java project or Web project as I tried.
Created attachment 52206 [details] Log file for creating a simple Java project. (I'm using JDK 6, same issue for JDK 5 as well)
Probably related to turning on formatting of newly created files. Milo, could you please look into it. Thanks
Caused by fix of issue 101720. I will fix it.
Oops, I wanted to mark as started :(
I guess that this is OS dependent since I cannot reproduce the problem on Linux. The problem is likely caused by the templates on Windows having CRLF line separator which gets shrinked to LF for the document insertion. The code assumed that the inserted text's length will match the characters in the document. Should be fixed please reopen if the problem persists. Thanks. Checking in FormatterWriterImpl.java; /cvs/editor/indent/src/org/netbeans/modules/editor/indent/FormatterWriterImpl.java,v <-- FormatterWriterImpl.java new revision: 1.3; previous revision: 1.2
potingwu, could you please verify this issue ? Thanks in advance.
For the record: fix for issue #101720 has been rolled back, as well as fix for this issue.
in this case we have to REOPEN this bug
I just updated my workspace and it's working.
I don't think this should be reopened. The fix for issue #101720 caused the regression reported here; reverting the changes made for #101720 means that the culprit of this regression is gone too. So, we are back to square one and all should work as before, which potingwu seems to confirm. Thanks guys!
that's good. I just didn't understand jlahoda's comment. Thx