Project: Eclipse_Platform_UI
Bug 267722 [CommonNavigator] ClassCastException when synchronizing
Reported: 2009-03-09 16:04:27 | Status: verified fixed

I20090309-1300 When I hit the synchronize button and then hit next on CVS,I get the following exception java.lang.ClassCastException: org.eclipse.ui.dialogs.ContainerCheckedTreeViewer at org.eclipse.ui.internal.navigator.NavigatorContentService.getSourceOfContribution(NavigatorContentService.java:732) at org.eclipse.ui.internal.navigator.NavigatorContentService.findDescriptorsByTriggerPoint(NavigatorContentService.java:768) at org.eclipse.ui.internal.navigator.NavigatorContentService.findContentExtensionsByTriggerPoint(NavigatorContentService.java:624) at org.eclipse.ui.internal.navigator.NavigatorContentService.findContentExtensionsByTriggerPoint(NavigatorContentService.java:605) at org.eclipse.ui.internal.navigator.NavigatorContentService.findRootContentExtensions(NavigatorContentService.java:509) at org.eclipse.ui.internal.navigator.NavigatorContentService.findRootContentExtensions(NavigatorContentService.java:467) at org.eclipse.ui.internal.navigator.NavigatorContentService.updateService(NavigatorContentService.java:375) at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.inputChanged(NavigatorContentServiceContentProvider.java:591) at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:270) at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1617) at org.eclipse.team.internal.ui.mapping.ModelElementSelectionPage.setVisible(ModelElementSelectionPage.java:221) at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1161) at org.eclipse.jface.wizard.WizardDialog.access$2(WizardDialog.java:1139) at org.eclipse.jface.wizard.WizardDialog$4.run(WizardDialog.java:1128) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1126) at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:820) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:369) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1204) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1228) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1213) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1031) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3208) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2881) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.team.internal.ui.synchronize.actions.SynchronizePageDropDownAction$1.run(SynchronizePageDropDownAction.java:40) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1204) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1228) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1213) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1031) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3208) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2881) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2393) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2357) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2209) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:499) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:492) 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:194) 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:368) 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:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:556) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:511) at org.eclipse.equinox.launcher.Main.run(Main.java:1284)

Files changed in fix:
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewerInternals.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentService.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/SafeDelegateTreeContentProvider.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/StructuredViewerManager.java bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonViewer.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/INavigatorContentServiceTests.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/NavigatorTestBase.java tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/NonCommonViewerView.java