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 78783 - Exception after right mouse click on any node when schema is broken
Summary: Exception after right mouse click on any node when schema is broken
Status: VERIFIED FIXED
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-06-21 14:58 UTC by kozlov
Modified: 2006-07-25 13:31 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-06-21 14:58:59 UTC
Reproduced in build060619.

To reproduce the bug:
- create newLaonApplicationSchema;
- clone the document, arrange windows so both of them become visible;
- switch the clone to Source view and delete anything to make schema not
well-formed;
- right mouse click on any node in Schema.
The following exception is thrown:

java.lang.IllegalStateException: The model is not initialized or is broken.
	at
org.netbeans.modules.xml.xdm.XDMModel.checkStableOrParsingState(XDMModel.java:804)
	at org.netbeans.modules.xml.xdm.XDMModel.getDocument(XDMModel.java:672)
	at org.netbeans.modules.xml.xdm.xam.XDMAccess.getDocumentRoot(XDMAccess.java:65)
	at
org.netbeans.modules.xml.xam.dom.AbstractDocumentModel.getDocument(AbstractDocumentModel.java:334)
	at
org.netbeans.modules.xml.schema.model.impl.SchemaComponentImpl.createNewComponent(SchemaComponentImpl.java:63)
	at
org.netbeans.modules.xml.schema.model.impl.GlobalSimpleTypeImpl.<init>(GlobalSimpleTypeImpl.java:31)
	at
org.netbeans.modules.xml.schema.model.impl.SchemaComponentFactoryImpl.createGlobalSimpleType(SchemaComponentFactoryImpl.java:71)
	at
org.netbeans.modules.xml.schema.ui.nodes.categorized.newtype.SchemaComponentCreator.createComponent(SchemaComponentCreator.java:472)
	at
org.netbeans.modules.xml.schema.ui.nodes.categorized.newtype.AdvancedSchemaComponentNewType.createComponent(AdvancedSchemaComponentNewType.java:155)
	at
org.netbeans.modules.xml.schema.ui.nodes.categorized.newtype.AdvancedSchemaComponentNewType.canCreate(AdvancedSchemaComponentNewType.java:123)
	at
org.netbeans.modules.xml.schema.ui.nodes.categorized.CategoryNode.getNewTypes(CategoryNode.java:373)
	at org.openide.actions.NewAction$ActSubMenuModel.newTypes(NewAction.java:177)
	at org.openide.actions.NewAction$ActSubMenuModel.access$200(NewAction.java:146)
	at org.openide.actions.NewAction$DelegateAction.getValue(NewAction.java:284)
	at org.openide.awt.Actions$SubMenuBridge.<init>(Actions.java:981)
	at org.openide.awt.Actions$SubMenu.<init>(Actions.java:1248)
	at
org.openide.actions.NewAction$DelegateAction.getPopupPresenter(NewAction.java:302)
	at org.openide.util.Utilities.actionsToPopup(Utilities.java:2616)
	at org.openide.util.Utilities.actionsToPopup(Utilities.java:2690)
	at
org.netbeans.modules.xml.schema.ui.basic.SchemaColumn$ColumnListView.createPopup(SchemaColumn.java:521)
	at
org.netbeans.modules.xml.schema.ui.basic.SchemaColumn$ColumnListView$PopupSupport.showPopup(SchemaColumn.java:543)
	at org.openide.awt.MouseUtils$PopupMouseAdapter.maybePopup(MouseUtils.java:152)
	at org.openide.awt.MouseUtils$PopupMouseAdapter.mouseReleased(MouseUtils.java:147)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:232)
	at java.awt.Component.processMouseEvent(Component.java:5488)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
	at java.awt.Component.processEvent(Component.java:5253)
	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.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	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 Chris Webster 2006-06-21 23:06:57 UTC
Schema broken state needs to be updated to deal with asynchronous sync being
performed. This must include both schema and instance views.
Comment 2 Samaresh Panda 2006-07-21 01:03:27 UTC
As a fix for this all the views including navigator must listen to change in the
model state. This integration takes care of the Schema view and design view but
not the navigator.

Module: "XML Schema UI - ABE"
InstanceDesignerPanel.java, new revision: 1.1.2.29; previous revision: 1.1.2.28

Module: "XML Schema Core"
SchemaABEViewMultiViewElement.java, new revision: 1.1.2.22;
Bundle.properties, new revision: 1.1.2.9;
SchemaColumnViewMultiViewElement.java, new revision: 1.1.2.20;

More coming...
Comment 3 Samaresh Panda 2006-07-21 07:06:19 UTC
More...
SchemaColumnViewMultiViewElement.java, new revision: 1.1.2.22;
SchemaABEViewMultiViewElement.java, new revision: 1.1.2.23;
SchemaDataObject.java, new revision: 1.1.2.8;

Comment 4 Samaresh Panda 2006-07-21 23:54:55 UTC
Navigator now listens to model state changes, more integrations
Module: "Schema UI ABE", Package: "navigator"
NavigatorContent.java, 1.1.2.6;
Bundle.properties, 1.1.2.4;

Module: "Schema UI Basic", Package: "navigator"
SchemaNavigatorContent.java, 1.1.2.3;
Bundle.properties, 1.1.2.2;

Please verify in nitely build.
Comment 5 kozlov 2006-07-25 13:31:53 UTC
Verified in build060724.