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.
To reproduce: - create Rails application - open new file wizard - choose Ruby|RHTML file - finish the wizard - paste the following at the end of the file <table border="<%= Time.no - press CTRL+Space to show code completion - press Enter to confirm 'now' field and exception appears. Build: NetBeans IDE Dev (Build 200802110004) VM: Java HotSpot(TM) Client VM, 1.5.0_11-b03 OS: Windows 2000, 5.0, x86 User comments: while typing "re" in rhtml file. should insert <%= %> STACKTRACE: (first 10 lines) javax.swing.text.BadLocationException: Invalid offset=-1 not within <0, 6768> at org.netbeans.editor.Utilities.checkOffsetValid(Utilities.java:1331) at org.netbeans.editor.Utilities.getLineOffset(Utilities.java:613) at org.netbeans.modules.editor.structure.formatting.TagBasedLexerFormatter.calcIndents_processOpeningTag(TagBasedLexerFormatter.java:508) at org.netbeans.modules.editor.structure.formatting.TagBasedLexerFormatter.reformat(TagBasedLexerFormatter.java:226) at org.netbeans.modules.editor.structure.formatting.TagBasedLexerFormatter.reformat(TagBasedLexerFormatter.java:160) at org.netbeans.modules.editor.structure.formatting.TagBasedLexerFormatter.process(TagBasedLexerFormatter.java:155) at org.netbeans.modules.html.editor.indent.HtmlIndentTask.reindent(HtmlIndentTask.java:68) at org.netbeans.modules.editor.indent.TaskHandler$MimeItem.runTask(TaskHandler.java:502) at org.netbeans.modules.editor.indent.TaskHandler.runTasks(TaskHandler.java:271) at org.netbeans.modules.editor.indent.IndentImpl.reformat(IndentImpl.java:293)
Build: NetBeans IDE Dev (Build 20080327142331) VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_05-b13 OS: Windows XP, 5.1, x86 User Comments: To reproduce: - create Rails project - create new RHTML file - type <table border="<%= Time.no - press Ctrl+space to invoke code completion - select now, press enter and exception is thrown
Created attachment 59245 [details] stacktrace
This issue has already 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=29181
Seems like this is at least a p2, not a p3
Fixed. http://hg.netbeans.org/main/rev/d5346e1b2d18
Integrated into 'main-golden', available in NB_Trunk_Production #324 build Changeset: http://hg.netbeans.org/main/rev/d5346e1b2d18 User: Tomasz Slota <tslota@netbeans.org> Log: #130009: javax.swing.text.BadLocationException: Invalid offset=-1 not within <0, 6768>
Verified.