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.
Reproduced in build 060727. To reproduce the bug: - create a 'newpo' schema; - open 'PurchaseOrderType' Complex Type node and copy sequence; - paste sequence under 'Items' Complex Type node ; - make undo. Exception: java.lang.AssertionError at org.netbeans.modules.xml.xdm.diff.DiffFinder.getPathToRoot(DiffFinder.java:368) at org.netbeans.modules.xml.xdm.diff.NodeInfo.getPathToRoot(NodeInfo.java:59) at org.netbeans.modules.xml.xdm.xam.XDMListener.propertyChange(XDMListener.java:178) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276) at org.netbeans.modules.xml.xdm.XDMModel.fireDiffEvents(XDMModel.java:213) at org.netbeans.modules.xml.xdm.XDMModel.performDiff(XDMModel.java:1132) at org.netbeans.modules.xml.xdm.XDMModel.resetDocument(XDMModel.java:698) at org.netbeans.modules.xml.xdm.XDMModelUndoableEdit.undo(XDMModelUndoableEdit.java:70) at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:46) at org.netbeans.modules.xml.xam.AbstractModel$ModelUndoableEdit.undo(AbstractModel.java:439) at org.netbeans.modules.xml.schema.core.multiview.SchemaColumnViewMultiViewElement$FilterUndoableEdit.undo(SchemaColumnViewMultiViewElement.java:663) at org.netbeans.modules.xml.schema.core.multiview.SchemaColumnViewMultiViewElement$BeforeModificationEdit.undo(SchemaColumnViewMultiViewElement.java:811) at javax.swing.undo.UndoManager.undoTo(UndoManager.java:313) at javax.swing.undo.UndoManager.undo(UndoManager.java:391) at org.netbeans.modules.xml.schema.core.multiview.SchemaColumnViewMultiViewElement$UndoRedoManager.undo(SchemaColumnViewMultiViewElement.java:580) at org.openide.actions.UndoAction.performAction(UndoAction.java:140) at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:100) at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:53) at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:96) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:377) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:232) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5999) at javax.swing.JComponent.processMouseEvent(JComponent.java:3240) at org.openide.awt.ToolbarButton.processMouseEvent(ToolbarButton.java:39) at java.awt.Component.processEvent(Component.java:5764) at java.awt.Container.processEvent(Container.java:1984) at java.awt.Component.dispatchEventImpl(Component.java:4407) at java.awt.Container.dispatchEventImpl(Container.java:2042) at java.awt.Component.dispatchEvent(Component.java:4237) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4248) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3912) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3842) at java.awt.Container.dispatchEventImpl(Container.java:2028) at java.awt.Window.dispatchEventImpl(Window.java:2405) at java.awt.Component.dispatchEvent(Component.java:4237) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:600) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Nam, is this a duplicate of the other cut/paste issues?
Yes it is. The general pattern is reordering "anonymous elements" containing child elements with identity. Cannot fix in release55_beta2, we could catch the exception in schema core undo call and display dialog Cannot Undo, clear the undo/redo queue. *** This issue has been marked as a duplicate of 78258 ***
Duplicate
Checked in code for handling undo/redo exception with warning dialog and restoring synchronization of schema model and dom tree. The original exception need to be fixed separately as part of fixing the duplicate issue 78258: /cvs/xml/schema/core/src/org/netbeans/modules/xml/schema/core/multiview/Attic/SchemaColumnViewMultiViewElement.java,v <-- SchemaColumnViewMultiViewElement.java new revision: 1.1.2.26; previous revision: 1.1.2.25 /cvs/xml/schema/core/src/org/netbeans/modules/xml/schema/core/multiview/Attic/Bundle.properties,v <-- Bundle.properties new revision: 1.1.2.11; previous revision: 1.1.2.10