Project: Eclipse_Platform_UI
Bug 378114 REGRESSION: partHidden not fired on perspective close and reset (was: NPE in JavadocView after resetting perspective)
Reported: 2012-04-30 15:34:23 | Status: verified fixed

- 4.2M7 test build: I20120429-1800 I encountered this problem during normal usage. The steps below may seem slightly un-normal, but they are the simplest means I've found for reproducing the problem consistently. - start with a typical Java perspective - close the Declaration and Problems views at the bottom so that just the Javadoc view is left in that group - Window -> Reset Perspective - close the Declaration view again - the following is written to the Error Log, and starts happening repeatedly in response to almost anything you try to do org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:4361) at org.eclipse.swt.SWT.error(SWT.java:4276) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1017) ... <snip> ... Caused by: java.lang.NullPointerException at org.eclipse.jdt.internal.ui.infoviews.JavadocView.doSetInput(JavadocView.java:1041) at org.eclipse.jdt.internal.ui.infoviews.AbstractInfoView.doSetInput(AbstractInfoView.java:679) at org.eclipse.jdt.internal.ui.infoviews.AbstractInfoView.access$2(AbstractInfoView.java:678) at org.eclipse.jdt.internal.ui.infoviews.AbstractInfoView$2$1.run(AbstractInfoView.java:643) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135) ... 23 more

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityPart.java