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 66427 - cold folded cut and paste problem
Summary: cold folded cut and paste problem
Status: RESOLVED DUPLICATE of bug 61971
Alias: None
Product: editor
Classification: Unclassified
Component: Code folding (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-11 01:09 UTC by cmorley256
Modified: 2007-11-05 13:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
my error messages file for this problem (110.10 KB, text/plain)
2005-10-11 01:10 UTC, cmorley256
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cmorley256 2005-10-11 01:09:33 UTC
I cut and paste some folded code, and it might have been a total of a few
hundred lines...(but folded was only about 20 or so)...

anyway, I got a couple of exceptions, and had to revert to the last saved
version of the source code.

java.lang.IndexOutOfBoundsException: Invalid line index=461 >= lineCount=461
	at org.netbeans.editor.LineRootElement.getElement(LineRootElement.java:85)
	at
org.netbeans.editor.DrawEngineDocView.createCustomView(DrawEngineDocView.java:210)
	at
org.netbeans.lib.editor.view.GapBoxView.customReloadChildren(GapBoxView.java:1829)
	at
org.netbeans.editor.DrawEngineDocView.customReloadChildren(DrawEngineDocView.java:191)
	at org.netbeans.lib.editor.view.GapBoxView.reloadChildren(GapBoxView.java:1741)
	at org.netbeans.lib.editor.view.GapBoxView.rebuild(GapBoxView.java:580)
	at org.netbeans.lib.editor.view.GapBoxView.offsetRebuild(GapBoxView.java:603)
	at
org.netbeans.editor.DrawEngineDocView.foldHierarchyChanged(DrawEngineDocView.java:288)
	at
org.netbeans.modules.editor.fold.FoldHierarchyExecution.fireFoldHierarchyListener(FoldHierarchyExecution.java:302)
	at
org.netbeans.modules.editor.fold.FoldHierarchyExecution.createAndFireFoldHierarchyEvent(FoldHierarchyExecution.java:528)
	at
org.netbeans.modules.editor.fold.FoldHierarchyTransactionImpl.commit(FoldHierarchyTransactionImpl.java:207)
	at
org.netbeans.modules.editor.fold.FoldHierarchyExecution.removeUpdate(FoldHierarchyExecution.java:702)
	at
org.netbeans.lib.editor.util.swing.PriorityDocumentListenerList.removeUpdate(PriorityDocumentListenerList.java:57)
	at javax.swing.text.AbstractDocument.fireRemoveUpdate(AbstractDocument.java:242)
	at org.netbeans.editor.BaseDocument.fireRemoveUpdate(BaseDocument.java:1262)
	at org.netbeans.editor.BaseDocument.remove(BaseDocument.java:731)
	at
javax.swing.plaf.basic.BasicTextUI$TextTransferHandler$TextTransferable.removeText(BasicTextUI.java:2413)
	at
javax.swing.plaf.basic.BasicTextUI$TextTransferHandler.exportDone(BasicTextUI.java:2288)
	at javax.swing.TransferHandler.exportToClipboard(TransferHandler.java:228)
	at
org.openide.text.QuietEditorPane$DelegatingTransferHandler.exportToClipboard(QuietEditorPane.java:134)
	at
org.openide.text.QuietEditorPane$DelegatingTransferHandler.exportToClipboard(QuietEditorPane.java:134)
	at
org.openide.text.QuietEditorPane$DelegatingTransferHandler.exportToClipboard(QuietEditorPane.java:134)
	at
javax.swing.TransferHandler$TransferAction.actionPerformed(TransferHandler.java:831)
	at javax.swing.text.JTextComponent.invokeAction(JTextComponent.java:1233)
	at javax.swing.text.JTextComponent.cut(JTextComponent.java:1180)
	at org.netbeans.editor.BaseKit$CutAction.actionPerformed(BaseKit.java:1287)
	at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:194)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1571)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2763)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2798)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2726)
	at java.awt.Component.processEvent(Component.java:5265)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3955)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3803)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810)
	at
java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:672)
	at
java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:920)
	at
java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:798)
	at
java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:636)
	at java.awt.Component.dispatchEventImpl(Component.java:3841)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Window.dispatchEventImpl(Window.java:1774)
	at java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)




*****then*****




javax.swing.undo.CannotUndoException
	at
org.netbeans.editor.BaseDocumentEvent.undo(BaseDocumentEvent.java:240)
	at
org.netbeans.editor.GuardedDocumentEvent.undo(GuardedDocumentEvent.java:41)
	at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:46)
	at
org.netbeans.editor.BaseDocument$AtomicCompoundEdit.undo(BaseDocument.java:1638)
	at javax.swing.undo.UndoManager.undoTo(UndoManager.java:210)
	at javax.swing.undo.UndoManager.undo(UndoManager.java:275)
	at
org.openide.text.CloneableEditorSupport$CESUndoRedoManager.access$2101(CloneableEditorSupport.java:2555)
	at
org.openide.text.CloneableEditorSupport$CESUndoRedoManager$RenderUndo.run(CloneableEditorSupport.java:2695)
	at
org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:219)
	at
org.openide.text.CloneableEditorSupport$CESUndoRedoManager$RenderUndo.<init>(CloneableEditorSupport.java:2675)
	at
org.openide.text.CloneableEditorSupport$CESUndoRedoManager$RenderUndo.<init>(CloneableEditorSupport.java:2667)
	at
org.openide.text.CloneableEditorSupport$CESUndoRedoManager.undo(CloneableEditorSupport.java:2586)
	at org.openide.actions.UndoAction.performAction(UndoAction.java:134)
	at
org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:94)
	at
org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:47)
	at
org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:90)
	at
org.netbeans.modules.editor.NbEditorKit$NbUndoAction.actionPerformed(NbEditorKit.java:512)
	at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:194)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1571)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2763)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2798)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2726)
	at java.awt.Component.processEvent(Component.java:5265)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3955)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3803)
	at
java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810)
	at
java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:672)
	at
java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:920)
	at
java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:798)
	at
java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:636)
	at java.awt.Component.dispatchEventImpl(Component.java:3841)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Window.dispatchEventImpl(Window.java:1774)
	at java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 cmorley256 2005-10-11 01:10:15 UTC
Created attachment 25775 [details]
my error messages file for this problem
Comment 2 Miloslav Metelka 2005-10-12 15:09:22 UTC
It would be nice if you could provide a reproducible case.
Anyway the problem should correspond to the issue 61971 which was fixed one day
after the build that you are using was made. Please reopen the issue if you can
reproduce the problem in newer builds too.

*** This issue has been marked as a duplicate of 61971 ***