Bug 287319 [CommonNavigator] ClassCastExceptions in NavigatorPipelineService when content provider can't be loaded
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:
bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorPipelineService.java
overrideableExtensions.addAll(contentService.findOverrideableContentExtensionsForPossibleChild(refreshable));
		}
		for (Iterator overrideableExtensionItr = overrideableExtensions.iterator(); overrideableExtensionItr.hasNext();) {
			pipelined |= pipelineInterceptRefresh((NavigatorContentExtension) overrideableExtensionItr.next(), aRefreshSynchronization, refreshable);
		}
		return pipelined;
		
	}
	private boolean pipelineInterceptRefresh(NavigatorContentExtension overrideableExtension,
			PipelinedViewerUpdate aRefreshSynchronization, Object refreshable) {
		boolean intercepted = false;
		
		NavigatorContentExtension[] overridingExtensionsForPossibleChild = overrideableExtension.getOverridingExtensionsForPossibleChild(refreshable);
		for (int i=0; i<overridingExtensionsForPossibleChild.length; i++) {
			try {
				if (overridingExtensionsForPossibleChild[i].internalGetContentProvider().isPipelined()) {
					intercepted |= ((IPipelinedTreeContentProvider) overridingExtensionsForPossibleChild[i]
							.internalGetContentProvider())
							.interceptRefresh(aRefreshSynchronization);
					
					if (overridingExtensionsForPossibleChild[i].getDescriptor().hasOverridingExtensions())
						intercepted |= pipelineInterceptRefresh(overridingExtensionsForPossibleChild[i], aRefreshSynchronization, refreshable);
				}
			} catch (Throwable e) {
				NavigatorPlugin.logError(0, NLS.bind(CommonNavigatorMessages.Exception_Invoking_Extension,
						new Object[] { overridingExtensionsForPossibleChild[i].getDescriptor().getId(), refreshable }), e);
			}
		}
		return intercepted;
	}