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.
This is probably a jVi only problem (but not necessarily). PropertiesEditorSupport does UndoRedoStampFlagManager extends UndoRedo.Manager and returns one for createUndoRedoManager. jVi's use of the UndoableEdits BEGIN/END_COMMIT_GROUP end up becoming edits in an UndoRedoStampFlagManager (rather than being used for control). There's a bug with that which happens since these edits are singletons which hold state depending on how they are used. They are intended to be innocuous as edits. These edits always return true for isSignificant(), but that's not enough to make them reusable, the fix is to also have these control edits always return true for canUndo/canRedo in CloneableEditorSupport$UndoGroupManager$CommitGroupEdit. I've added this fix to the patch for bug Bug 199568. === example exception javax.swing.undo.CannotUndoException at javax.swing.undo.AbstractUndoableEdit.undo (AbstractUndoableEdit.java:93) at javax.swing.undo.UndoManager.undoTo(UndoManager.java:320) at javax.swing.undo.UndoManager.undo(UndoManager.java:398) at org.openide.awt.UndoRedo$Manager.undo(UndoRedo.java:184) at org.netbeans.modules.properties .PropertiesEditorSupport$UndoRedoStampFlagManager .undo(PropertiesEditorSupport.java:1351) [catch] at org.openide.actions.UndoAction.performAction(UndoAction.java:185)
Fixed by commit for Bug 199568 "Integrated as ergonomics#971cca9637b5"
Reopening. The fix for Bug 21237 has reintroduced this issue. I'll post a patch later today. The exception hasn't changed much javax.swing.undo.CannotUndoException at javax.swing.undo.AbstractUndoableEdit.undo (AbstractUndoableEdit.java:93) at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:42) at javax.swing.undo.UndoManager.undoTo(UndoManager.java:320) at javax.swing.undo.UndoManager.undo(UndoManager.java:398) at org.openide.awt.UndoRedo$Manager.undo(UndoRedo.java:161) at org.netbeans.modules.properties .PropertiesEditorSupport$UndoRedoStampFlagManager .undo(PropertiesEditorSupport.java:1532) at org.netbeans.core.multiview .MultiViewPeer$DelegateUndoRedo.undo(MultiViewPeer.java:813) [catch] at org.openide.actions.UndoAction.performAction(UndoAction.java:185)
Created attachment 113672 [details] bug fix Mila, The attached patch fixes the *_COMMIT_GROUP special edits. I also used it for the SAVEPOINT special edit but it might not be appropriate for that. If savepoint depends on canRedo() and canUndo() flipping around, then the fix is not correct for it. I can rework the patch, if you'd like.
Thanks for the patch, Ernie. It's fine for SAVEPOINT too it's just a marker value.http://hg.netbeans.org/jet-main/rev/e01de0f11813
Integrated into release71: e01de0f11813 transplanted to 3503f47f7613
Integrated into 'releases' Changeset: http://hg.netbeans.org/releases/rev/3503f47f7613 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #199699 - undo problems in properties editor; exceptions and erratic behavior. (transplanted from e01de0f118132500d4a5511a0f1f13f584d00d83)
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/e01de0f11813 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #199699 - undo problems in properties editor; exceptions and erratic behavior.