Project: Eclipse_Platform_UI
Bug 287319 [CommonNavigator] ClassCastExceptions in NavigatorPipelineService when content provider can't be loaded
Reported: 2009-08-21 12:07:14 | Status: verified fixed

Build ID: I351I20090817 Steps To Reproduce: If there is a content provider registered on the org.eclipse.ui.navigator.navigatorContent extension point that overrides another extension and the content provider can't be instantiated for whatever reason, you start to see a bunch of ClassCastExceptions. The problem is that the methods of the NavigatorPipelineService blindly cast the content provider returned by extensions to the IPipelinedTreeContentProvider interface (look, for example at the method NavigatorPipelineService#pipelineInterceptAdd). However, if a content provider can't be instantiated for whatever reason, the singleton SkeletonTreeContentProvider gets returned by default (see NavigatorContentExtension#internalGetContentProvider), which can't be cast to IPipelinedTreeContentProvider. We obviously need to fix our content provider so that it can be initialized, but the navigator service should be more robust against this kind of problem. More information:

Files changed in fix:
bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorPipelineService.java