Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 263319

Summary: XSD editor allows deletion of built-in types (e.g. string) -> NPE.
Product: [WebTools] WTP Source Editing Reporter: Chris West (Faux) <eclipse>
Component: wst.xsdAssignee: Wini Mark <wmmark>
Status: CLOSED DUPLICATE QA Contact: Valentin Baciu <valentinbaciu>
Severity: normal    
Priority: P3 CC: keith.chong.ca
Version: 3.1   
Target Milestone: 3.1 M5   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Chris West (Faux) CLA 2009-02-02 18:48:06 EST
Create a "Custom Types" which "Inheret from"s a built-in type, for example, "string".

1) Ensure the Properties View is on screen.
2) In the graphical view of this type (access by double-clicking it on the main page), right-click, delete the built-in type (i.e. "string").
3) Observe the errors.

wtp-S-3.1M4-20081219210304.zip on eclipse-SDK-3.5M4-win32-x86_64.zip

-- Error Details --
Date: Mon Feb 02 23:41:01 GMT 2009
Message: Problems occurred when invoking code from plug-in: "org.eclipse.ui.views.properties.tabbed".
Severity: Error
Plugin: org.eclipse.ui.views.properties.tabbed
Session Data:
eclipse.buildId=I20081211-1908
java.version=1.6.0_12-ea
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB
Command-line arguments:  -os win32 -ws win32 -arch x86_64


Exception Stack Trace:
java.lang.NullPointerException
	at org.eclipse.xsd.util.XSDConstants.lookupQualifier(XSDConstants.java:1433)
	at org.eclipse.xsd.impl.XSDNamedComponentImpl.getQName(XSDNamedComponentImpl.java:654)
	at org.eclipse.xsd.impl.XSDNamedComponentImpl.getQName(XSDNamedComponentImpl.java:667)
	at org.eclipse.wst.xsd.ui.internal.common.properties.sections.XSDComplexTypeSection.fillTypesCombo(XSDComplexTypeSection.java:381)
	at org.eclipse.wst.xsd.ui.internal.common.properties.sections.XSDComplexTypeSection.refresh(XSDComplexTypeSection.java:168)
	at org.eclipse.ui.views.properties.tabbed.TabContents$6.run(TabContents.java:217)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.core.runtime.Platform.run(Platform.java:874)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.ui.views.properties.tabbed.TabContents.refresh(TabContents.java:220)
	at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage$SelectionChangedListener.selectionChanged(TabbedPropertySheetPage.java:224)
	at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.core.runtime.Platform.run(Platform.java:874)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160)
	at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2062)
	at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1638)
	at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:392)
	at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.setInput(TabbedPropertySheetPage.java:740)
	at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.selectionChanged(TabbedPropertySheetPage.java:559)
	at org.eclipse.wst.xsd.ui.internal.editor.XSDTabbedPropertySheetPage.selectionChanged(XSDTabbedPropertySheetPage.java:118)
	at org.eclipse.ui.views.properties.PropertySheet.selectionChanged(PropertySheet.java:216)
	at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156)
	at org.eclipse.ui.internal.AbstractSelectionService$1.selectionChanged(AbstractSelectionService.java:62)
	at org.eclipse.wst.xsd.ui.internal.adt.editor.CommonSelectionManager.setSelection(CommonSelectionManager.java:98)
	at org.eclipse.wst.xsd.ui.internal.adt.editor.CommonSelectionManager.selectionChanged(CommonSelectionManager.java:71)
	at org.eclipse.wst.xsd.ui.internal.adt.design.DesignViewGraphicalViewer$ADTSelectionChangedListener.notifyListeners(DesignViewGraphicalViewer.java:218)
	at org.eclipse.wst.xsd.ui.internal.adt.design.DesignViewGraphicalViewer$ADTSelectionChangedListener.selectionChanged(DesignViewGraphicalViewer.java:255)
	at org.eclipse.gef.ui.parts.AbstractEditPartViewer.fireSelectionChanged(AbstractEditPartViewer.java:243)
	at org.eclipse.gef.ui.parts.AbstractEditPartViewer$1.run(AbstractEditPartViewer.java:129)
	at org.eclipse.gef.SelectionManager.fireSelectionChanged(SelectionManager.java:115)
	at org.eclipse.gef.SelectionManager.appendSelection(SelectionManager.java:76)
	at org.eclipse.wst.xsd.ui.internal.adt.editor.ADTMultiPageEditor$CustomSelectionManager.appendSelection(ADTMultiPageEditor.java:274)
	at org.eclipse.gef.ui.parts.AbstractEditPartViewer.appendSelection(AbstractEditPartViewer.java:188)
	at org.eclipse.gef.ui.parts.AbstractEditPartViewer.select(AbstractEditPartViewer.java:582)
	at org.eclipse.gef.tools.SelectEditPartTracker.performSelection(SelectEditPartTracker.java:213)
	at org.eclipse.gef.tools.SelectEditPartTracker.performConditionalSelection(SelectEditPartTracker.java:159)
	at org.eclipse.gef.tools.SelectEditPartTracker.handleButtonDown(SelectEditPartTracker.java:90)
	at org.eclipse.gef.tools.AbstractTool.mouseDown(AbstractTool.java:975)
	at org.eclipse.gef.tools.SelectionTool.mouseDown(SelectionTool.java:490)
	at org.eclipse.gef.EditDomain.mouseDown(EditDomain.java:219)
	at org.eclipse.wst.xsd.ui.internal.adt.editor.CommonMultiPageEditor$2.mouseDown(CommonMultiPageEditor.java:134)
	at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMousePressed(DomainEventDispatcher.java:342)
	at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDown(LightweightSystem.java:513)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:179)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3875)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3470)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:333)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:366)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:550)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:505)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1237)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1213)
Comment 1 Valentin Baciu CLA 2009-02-02 20:21:02 EST
Thanks for catching this. Yeah, it seems there's been a little regression here. 

Keith, I'm just speculating, but perhaps due to the fix for bug 158753?
Comment 2 Valentin Baciu CLA 2009-02-03 14:45:30 EST
Seems this problem or similar was already reported as bug 259012.

*** This bug has been marked as a duplicate of bug 259012 ***
Comment 3 Chris West (Faux) CLA 2009-02-03 14:47:01 EST
Really need to get the hang of bugzilla search one of these days.

Thanks.
Comment 4 Valentin Baciu CLA 2009-02-03 14:54:38 EST
Me too :-). Since you seem to agree with the dup status please mark as verified. Thanks!
Comment 5 Valentin Baciu CLA 2009-05-04 16:25:43 EDT
Closing.