Project: Eclipse_Platform_UI
Bug 166368 [Viewers] LabelProvider disposed twice
Reported: 2006-11-30 12:16:18 | Status: verified fixed

N20061129-2300, was OK in I20061129-1340 With the latest changes in ViewerColumn, a LabelProvider is now disposed twice. Steps: - Search for references to a java element - open view menu of Search view and choose "Show as List" java.lang.NullPointerException at org.eclipse.jdt.internal.ui.search.SearchLabelProvider.dispose(SearchLabelProvider.java:160) at org.eclipse.jface.viewers.DecoratingLabelProvider.dispose(DecoratingLabelProvider.java:77) at org.eclipse.jface.viewers.ViewerColumn.handleDispose(ViewerColumn.java:149) at org.eclipse.jface.viewers.ViewerColumn$2.widgetDisposed(ViewerColumn.java:66) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:101) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:927) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:951) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:932) at org.eclipse.swt.widgets.Widget.release(Widget.java:740) at org.eclipse.swt.widgets.Widget.dispose(Widget.java:409) at org.eclipse.search.ui.text.AbstractTextSearchViewPage.disposeViewer(AbstractTextSearchViewPage.java:624) at org.eclipse.search.ui.text.AbstractTextSearchViewPage.setLayout(AbstractTextSearchViewPage.java:613) at org.eclipse.search2.internal.ui.basic.views.SetLayoutAction.run(SetLayoutAction.java:30) at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:927) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3463) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3077) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1945) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1909) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:425) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) 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.equinox.internal.app.EclipseAppContainer.callMethod(EclipseAppContainer.java:523) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:147) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:348) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:165) 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:341) at org.eclipse.core.launcher.Main.basicRun(Main.java:285) at org.eclipse.core.launcher.Main.run(Main.java:987) at org.eclipse.core.launcher.Main.main(Main.java:962)

Files changed in fix:
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/CellLabelProvider.java bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/DelegatingCellLabelProvider.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/viewers/SimpleTableViewerTest.java