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 am editing an XML file with long (wide) lines. When editing some text that is so far right that the screen is scrolled horizontally, it keeps jumping around scrolling to the left. When i checked the IDE log it were littered with this exception.. I am using NetBeans IDE Build 201211240959 INFO [org.netbeans.modules.editor.lib2.typinghooks.TypedBreakInterceptorsManager]: TypedBreakInterceptor crashed in insert(): org.netbeans.modules.xml.text.indent.LineBreakHook@66b55f5d java.lang.IllegalArgumentException: The caretPosition=5 must point in the text=<0, 2>. at org.netbeans.spi.editor.typinghooks.TypedBreakInterceptor$MutableContext.setText(TypedBreakInterceptor.java:337) at org.netbeans.modules.xml.text.indent.LineBreakHook.insert(LineBreakHook.java:217) [catch] at org.netbeans.modules.editor.lib2.typinghooks.TypedBreakInterceptorsManager$Transaction.textTyped(TypedBreakInterceptorsManager.java:113) at org.netbeans.editor.BaseKit$InsertBreakAction$1.run(BaseKit.java:1387) at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:347) at org.netbeans.editor.BaseKit$InsertBreakAction.actionPerformed(BaseKit.java:1385) at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:339) at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1664) at javax.swing.JComponent.processKeyBinding(JComponent.java:2879) at javax.swing.JComponent.processKeyBindings(JComponent.java:2926) at javax.swing.JComponent.processKeyEvent(JComponent.java:2842) at java.awt.Component.processEvent(Component.java:6282) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4861) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1895) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:762) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1027) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:899) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:727) at java.awt.Component.dispatchEventImpl(Component.java:4731) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Window.dispatchEventImpl(Window.java:2719) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:682) at java.awt.EventQueue$3.run(EventQueue.java:680) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:696) at java.awt.EventQueue$4.run(EventQueue.java:694) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:693) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139) at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
What are your indentation settings for all languages and xml ?
please also attach some specific example or specific instructions for reproduction; I've tried to edit (add, change) some attributes and elements on a long line > 300 chars, scrolled in the editor view, and no error or just log entry appeared. Thanks.
Created attachment 128557 [details] File in which the err. can be reproduced First of - I can only produce this error in an XML file that also contain tags for inserting stuff via Velocity. I have attached an example - to reproduce, just scroll all the way to the right and edit one of the long lines. After a few moments the viewport will jump to the left. Tabs & indents for all languages: Tabs to spaces: : false Number of spaces per indent : 4 Tab Size : 4 Right Margin : 80 Line Wrap : off I do not know where to find indentation settings for XML (only options in the language combo is : All Languages, JSON, Java, Javascript)
Changeset: 4e23ddd054e7 Author: Svata Dedic <sdedic@netbeans.org> Date: 2012-11-29 16:38 Message: if tabs are not replaced, indent string may contain less than desiredIndent chars
Integrated into 'main-golden', will be available in build *201212040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/4e23ddd054e7 User: Svata Dedic <sdedic@netbeans.org> Log: Issue #222874 - java.lang.IllegalArgumentException while editing xml..: fixed if tabs are not replaced, indent string may contain less than desiredIndent chars