Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 158038 - ClassCastException when opening WSDL editor with file that isn't in the workspace
Summary: ClassCastException when opening WSDL editor with file that isn't in the works...
Status: CLOSED DUPLICATE of bug 144811
Alias: None
Product: WTP Webservices
Classification: WebTools
Component: wst.wsdl (show other bugs)
Version: 1.5   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: wst.wsdl CLA
QA Contact: Craig Salter CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-20 14:09 EDT by klundberg CLA
Modified: 2006-11-28 15:52 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description klundberg CLA 2006-09-20 14:09:20 EDT
To reproduce, choose File -> Open File ... and select a WSDL file that isn't in the workspace. A class cast exception occurs in org.eclipse.wst.wsdl.ui.internal.asd.ASDMultiPageEditor.buildAndSetModel().

The reason is that the file editor input is a JavaFileEditorInput and ASDMultiPageEditor.buildAndSetModel casts the input to IFileEditorInput.

Bug# 103491 seems to handle a similar issue but this issue appears in a different place and it appears in 1.5.

Complete stack trace:

java.lang.ClassCastException: org.eclipse.ui.internal.editors.text.JavaFileEditorInput
	at org.eclipse.wst.wsdl.ui.internal.asd.ASDMultiPageEditor.buildAndSetModel(ASDMultiPageEditor.java:128)
	at org.eclipse.wst.wsdl.ui.internal.asd.ASDMultiPageEditor.createPages(ASDMultiPageEditor.java:106)
	at org.eclipse.wst.wsdl.ui.internal.InternalWSDLMultiPageEditor.createPages(InternalWSDLMultiPageEditor.java:347)
	at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:276)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:596)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:372)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566)
	at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:214)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2588)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2521)
	at org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPage.java:2513)
	at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2498)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2493)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2470)
	at org.eclipse.ui.internal.editors.text.OpenExternalFileAction.run(OpenExternalFileAction.java:132)
	at org.eclipse.ui.internal.editors.text.OpenExternalFileAction.run(OpenExternalFileAction.java:100)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:254)
	at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3164)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
	at org.eclipse.core.launcher.Main.run(Main.java:977)
	at org.eclipse.core.launcher.Main.main(Main.java:952)
Comment 1 Craig Salter CLA 2006-09-25 23:48:21 EDT

*** This bug has been marked as a duplicate of 144811 ***
Comment 2 John Lanuti CLA 2006-11-28 15:52:07 EST
This is part of a mass update to close out all stale WTP bugs which are in the resolved state without an appropriate targeted version.  If you feel this bug was closed inappropriately, please reopen.