Project: JDT
Bug 173438 [Contexts] ContextAuthority$1.widgetDisposed(..) does not handle case where shell is already disposed
Reported: 2007-02-08 08:30:52 | Status: verified fixed

I20070208-0010 ContextAuthority$1.widgetDisposed(..) does not handle the case where the shell is already disposed. It should check whether newShell has been disposed before calling newShell.removeDisposeListener(this). To reproduce, remove the asyncExec(..) workaround in HEAD of org.eclipse.jdt.internal.ui.refactoring.reorg.RenameInformationPopup.PopupVisibilityManager.start().new DisposeListener() {...}.widgetDisposed(DisposeEvent). org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:3478) at org.eclipse.swt.SWT.error(SWT.java:3401) at org.eclipse.swt.SWT.error(SWT.java:3372) at org.eclipse.swt.widgets.Widget.error(Widget.java:432) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:325) at org.eclipse.swt.widgets.Widget.removeDisposeListener(Widget.java:907) at org.eclipse.ui.internal.contexts.ContextAuthority$1.widgetDisposed(ContextAuthority.java:267) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:116) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:943) at org.eclipse.swt.widgets.Widget.release(Widget.java:740) at org.eclipse.swt.widgets.Widget.dispose(Widget.java:410) at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java:441) at org.eclipse.swt.widgets.Shell.dispose(Shell.java:653) at org.eclipse.swt.widgets.Decorations.closeWidget(Decorations.java:302) at org.eclipse.swt.widgets.Shell.close(Shell.java:476) at org.eclipse.swt.widgets.Shell.traverseEscape(Shell.java:1634) at org.eclipse.swt.widgets.Control.traverse(Control.java:3197) at org.eclipse.swt.widgets.Control.translateTraversal(Control.java:3174) at org.eclipse.swt.widgets.Composite.translateTraversal(Composite.java:935) at org.eclipse.swt.widgets.Display.translateTraversal(Display.java:4012) at org.eclipse.swt.widgets.Display.filterMessage(Display.java:1021) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3100) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2264) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2228) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2103) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:457) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:452) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:101) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:146) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:476) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:416) at org.eclipse.equinox.launcher.Main.run(Main.java:1124) at org.eclipse.equinox.launcher.Main.main(Main.java:1099)

Files changed in fix:
org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameInformationPopup.java