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 82398 - NPE on switching to Design view after undoing changes made in Design view
Summary: NPE on switching to Design view after undoing changes made in Design view
Status: VERIFIED WORKSFORME
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P1 blocker (vote)
Assignee: Samaresh Panda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-10 15:04 UTC by kozlov
Modified: 2006-09-04 12:37 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-08-10 15:04:19 UTC
Reproduced in build 060802.

To reproduce the bug:

- create a 'newpo' schema;
- switch to Design view;
- drag attribute to 'shipTo' element;
- without  pressing any key push the Schema view button;
- invoke 'Undo';
- switch to Design View;

NPE:

java.lang.NullPointerException
	at org.netbeans.modules.xml.axi.impl.AttributeProxy.getName(AttributeProxy.java:69)
	at
org.netbeans.modules.xml.schema.abe.nodes.AttributeNode.getName(AttributeNode.java:147)
	at java.beans.FeatureDescriptor.getDisplayName(FeatureDescriptor.java:61)
	at
org.netbeans.modules.navigator.NavigatorController.updateTCTitle(NavigatorController.java:242)
	at
org.netbeans.modules.navigator.NavigatorController.updateContext(NavigatorController.java:206)
	at
org.netbeans.modules.navigator.NavigatorController.access$600(NavigatorController.java:62)
[catch] at
org.netbeans.modules.navigator.NavigatorController$ActNodeSetter.run(NavigatorController.java:388)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:598)
	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 Samaresh Panda 2006-08-10 18:37:48 UTC
Installed 060802 build. Unfortunately 'Undo' is not enabled. Not sure how you
managed to undo.

Would you mind trying the same with some newer builds?
Comment 2 Samaresh Panda 2006-08-15 19:35:34 UTC
I'm sorry. I dont see undo/redo enabled in this situation. Marking this as invalid.

There is a bug http://www.netbeans.org/issues/show_bug.cgi?id=81555 that clearly
says on undo/redo doesn't work on design view.
Comment 3 kozlov 2006-08-24 13:01:42 UTC
While NPE occures I think it will be better not to close the bug.
Comment 4 Samaresh Panda 2006-09-02 19:21:22 UTC
Post beta, the undo/redo was disabled in design view and hence we created
http://www.netbeans.org/issues/show_bug.cgi?id=81555.

After fixing #81555, I'm not able to reproduce this NPE anymore.

One caveat: Undo-redo doesn't work when you drag/drop item from palette. So, do
not drag/drop item from palette, rather use right-click add to add items. I have
created a separate issue (http://www.netbeans.org/issues/show_bug.cgi?id=84089)
to track that.
Comment 5 kozlov 2006-09-04 12:37:13 UTC
Verified in build060904.