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 81327 - Exception on undo of copy/pasting
Summary: Exception on undo of copy/pasting
Status: CLOSED DUPLICATE of bug 78258
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P1 blocker (vote)
Assignee: Nam Nguyen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-28 12:12 UTC by kozlov
Modified: 2006-07-31 19:00 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kozlov 2006-07-28 12:12:27 UTC
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)
Comment 1 Chris Webster 2006-07-28 14:43:31 UTC
Nam, is this a duplicate of the other cut/paste issues?
Comment 2 Nam Nguyen 2006-07-28 16:01:58 UTC
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 ***
Comment 3 kozlov 2006-07-31 11:32:05 UTC
Duplicate
Comment 4 Nam Nguyen 2006-07-31 19:00:42 UTC
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