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 was editing a plain text file containing an XML document. I have noticed some very bizarre behavior in the editor before, but I thought it was just the auto-formatting at work and I was going to look into the annoyance later (it was just a small document). Here's the issue.. <blah> \t<one/> \t<two> \t\t<three/> \t\t<four/> \t</two> </blah> if the you place the cursor in front of the <three/> tag and hit backspace, it will jump back to be aligned with the <two> tag. however, if you hit tab, it won't fly back to it's former position. it will stubbornly sit there. you have to insert a new line above it, tab it over, and then backspace the <two/> tag up to it. very annoying. anyhow, while trying to do silly things like that to get around the problem the following error poped up so i'm thinking it's a bug and not a feature to try and line the tags up. *********** Exception occurred ************ Fri Mar 09 08:33:43 EST 2001java.lang.StringIndexOutOfBoundsException: String index out of range: 2 java.lang.StringIndexOutOfBoundsException: String index out of range: 2 at java.lang.String.charAt(String.java:507) at org.netbeans.editor.Formatter.insertTabString(Formatter.java:299) at org.netbeans.editor.BaseKit$InsertTabAction.actionPerformed (BaseKit.java:824) at org.netbeans.editor.ext.ExtKit$ExtInsertTabAction.actionPerformed (ExtKit.java:879) at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:126) at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1702) at javax.swing.JComponent.processKeyBinding(JComponent.java:2156) at javax.swing.JComponent.processKeyBindings(JComponent.java:2182) at javax.swing.JComponent.processKeyEvent(JComponent.java:2119) at javax.swing.JEditorPane.processKeyEvent(JEditorPane.java:1159) at java.awt.Component.processEvent(Component.java:3555) at java.awt.Container.processEvent(Container.java:1164) at java.awt.Component.dispatchEventImpl(Component.java:2595) at java.awt.Container.dispatchEventImpl(Container.java:1213) at java.awt.Component.dispatchEvent(Component.java:2499) at java.awt.LightweightDispatcher.processKeyEvent(Container.java:2155) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2135) at java.awt.Container.dispatchEventImpl(Container.java:1200) at java.awt.Window.dispatchEventImpl(Window.java:912) at java.awt.Component.dispatchEvent(Component.java:2499) at java.awt.EventQueue.dispatchEvent(EventQueue.java:319) [catch] at java.awt.EventDispatchThread.pumpOneEvent (EventDispatchThread.java:103) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
Now it should be OK. (fixed in Formatter.java 1.32.2.1)
*** Issue 10419 has been marked as a duplicate of this issue. ***
Resolved for 3.3.x or earlier, no new info since then -> closing.