Project: Eclipse_Platform_UI
Bug 64784 [EditorMgmt] NPE switching to editor
Reported: 2004-05-31 13:59:42 | Status: closed fixed

I20040529 Mac OS X I imported org.eclipse.pde.core and opened two files. I shut down eclipse. Started eclipse back up and tried to select the editor that was not selected (happened to be using "single editor tab" mode but I don't think this matters). Got the following error: java.lang.NullPointerException at org.eclipse.ui.internal.EditorManager$7.run(EditorManager.java:801) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:615) at org.eclipse.core.runtime.Platform.run(Platform.java:758) at org.eclipse.ui.internal.EditorManager.busyRestoreEditor(EditorManager.java:775) at org.eclipse.ui.internal.EditorManager$6.run(EditorManager.java:768) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ui.internal.EditorManager.restoreEditor(EditorManager.java:764) at org.eclipse.ui.internal.EditorManager$Editor.getEditor(EditorManager.java:1168) at org.eclipse.ui.internal.EditorManager$Editor.getPart(EditorManager.java:1160) at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313) at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:122) at org.eclipse.ui.internal.presentations.DefaultPartPresentation.selectPart(DefaultPartPresentation.java: 1090) at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:922) at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:897) at org.eclipse.ui.internal.PartStack.presentationSelectionChanged(PartStack.java:664) at org.eclipse.ui.internal.PartStack.access$0(PartStack.java:650) at org.eclipse.ui.internal.PartStack$1.selectPart(PartStack.java:94) at org.eclipse.ui.internal.presentations.DefaultPartPresentation.setSelection(DefaultPartPresentation.java: 1371) at org.eclipse.ui.internal.presentations.BasicStackList.gotoSelectedElement(BasicStackList.java:217) at org.eclipse.ui.internal.presentations.AbstractTableInformationControl$4.mouseUp(AbstractTableInform ationControl.java:286) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:136) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1196) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1220) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1205) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1053) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2867) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2537) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1363) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1334) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:253) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:334) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:128) 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:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:185) at org.eclipse.core.launcher.Main.run(Main.java:638) at org.eclipse.core.launcher.Main.main(Main.java:622) Then I got some entries in the Error Log that said "Unable to restore editor - no input factor id" - there was no detail info for these entries

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/BasicStackList.java