Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 240453 - [Workbench] Restarting Eclipse after change of Target Platform results in exceptions
Summary: [Workbench] Restarting Eclipse after change of Target Platform results in exc...
Status: RESOLVED DUPLICATE of bug 218197
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.5   Edit
Assignee: Eric Moffatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-11 04:28 EDT by Tonny Madsen CLA
Modified: 2009-03-05 14:30 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tonny Madsen CLA 2008-07-11 04:28:30 EDT
To reconstruct:
- open a java file from RCP (3.4 edition)
- change the target platform to include a different version of the plug-in - e.g. from 3.3 edition
- restart Eclipse

All the editors that previously showed files from 3.4, now have an exception...

This problem is to be expected - but an exception???

Maybe PDE should close editors when the target platform is changed?

-- Error Details --
Date: Fri Jul 11 10:20:25 CEST 2008
Message: Unable to create editor ID org.eclipse.jdt.ui.ClassFileEditor: Factory org.eclipse.jdt.ui.ClassFileEditorInputFactory returned null from createElement for editor id=org.eclipse.jdt.ui.ClassFileEditor name=URI.class
Severity: Error
Plugin: org.eclipse.ui
Session Data:
eclipse.buildId=I20080617-2000
java.version=1.6.0_06
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86 -clean


Exception Stack Trace:
org.eclipse.ui.PartInitException: Factory org.eclipse.jdt.ui.ClassFileEditorInputFactory returned null from createElement for editor id=org.eclipse.jdt.ui.ClassFileEditor name=URI.class
	at org.eclipse.ui.internal.EditorReference.getRestoredInput(EditorReference.java:367)
	at org.eclipse.ui.internal.EditorReference.getEditorInput(EditorReference.java:328)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:591)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:428)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:594)
	at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:306)
	at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
	at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
	at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
	at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1256)
	at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1209)
	at org.eclipse.ui.internal.PartStack.presentationSelectionChanged(PartStack.java:843)
	at org.eclipse.ui.internal.PartStack.access$1(PartStack.java:829)
	at org.eclipse.ui.internal.PartStack$1.selectPart(PartStack.java:139)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation$1.handleEvent(TabbedStackPresentation.java:133)
	at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:267)
	at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:276)
	at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.access$1(DefaultTabFolder.java:1)
	at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder$2.handleEvent(DefaultTabFolder.java:87)
	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.Widget.sendEvent(Widget.java:1027)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:770)
	at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3242)
	at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:2017)
	at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:320)
	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:3823)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
	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:382)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	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:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Comment 1 Eric Moffatt CLA 2008-07-23 14:38:35 EDT
Yes, we're working on making the various 'dynamic plugins' aspects of the UI handle these type of exceptions more gracefully (see bug 237727).
Comment 2 Dani Megert CLA 2009-01-20 09:41:51 EST
Eric, I don't see how bug 237727 relates here as that bug is about ViewFactory while this bug here is about the restoring editors.
Comment 3 Eric Moffatt CLA 2009-01-20 15:34:23 EST
Thanks Dani, my Copy/Paste skills must be diminishing with age...;-)

I meant bug 217974.
Comment 4 Eric Moffatt CLA 2009-01-20 15:35:49 EST
Sheesh, sorry dude, this is the wrong defect. 
Comment 5 Eric Moffatt CLA 2009-03-05 14:30:34 EST
This is another scenario for bug 218197. In this case it's the changing of the target that mimics a dynamic change...


*** This bug has been marked as a duplicate of bug 218197 ***