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 133077 - BadLocationException when pressing Enter key some times
Summary: BadLocationException when pressing Enter key some times
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Rastislav Komara
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2008-04-17 08:49 UTC by Alexandr Scherbatiy
Modified: 2008-04-22 20:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log file (104.79 KB, text/plain)
2008-04-17 08:51 UTC, Alexandr Scherbatiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2008-04-17 08:49:21 UTC
Steps to reproduce:

- Create a JavaFX Script file
- Press <Ctrl+A> and delete all text from the file
- Press <Enter>

BadLocationException pops up:
avax.swing.text.BadLocationException: offset=2 > doc.getLength()=1
	at org.netbeans.modules.editor.indent.IndentImpl.checkOffsetInDocument(IndentImpl.java:324)
	at org.netbeans.modules.editor.indent.api.IndentUtils.lineStartOffset(IndentUtils.java:140)
	at org.netbeans.modules.editor.indent.spi.Context.lineStartOffset(Context.java:128)
	at org.netbeans.modules.javafx.editor.JFXIndentTask.adjustOffsetToNewLine(JFXIndentTask.java:144)
	at org.netbeans.modules.javafx.editor.JFXIndentTask.getScopeIndent(JFXIndentTask.java:195)
	at org.netbeans.modules.javafx.editor.JFXIndentTask.indentLine(JFXIndentTask.java:124)
Comment 1 Alexandr Scherbatiy 2008-04-17 08:51:14 UTC
Created attachment 60321 [details]
IDE log file
Comment 2 Rastislav Komara 2008-04-17 13:16:39 UTC
fixed by changeset:   12234:377cd6a3e73b
Comment 3 Lark Fitzgerald 2008-04-22 20:29:53 UTC
Verified using:
Product Version: NetBeans IDE 6.1 RC2 (Build 200804170002)
Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
Plugin & Samples: CB 148 2008-04-22_18-54-09.zip