Bug 111959 [Viewers] ColorAndFontCollector and getColorAndFontCollector() visibility conflict
I'm creating a viewer for a custom table and extending StructuredViewer. In StructuredViewer the method getColorAndFontCollector() is protected so I should be able to access it. But the return type is ColorAndFontCollector which is declared as a package level class thus I can't call the method because the return type isn't visible to viewers outside of the viewers package.
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java
protected void buildLabel(ViewerLabel updateLabel, Object element){
		if (getLabelProvider() instanceof IViewerLabelProvider) {
			IViewerLabelProvider itemProvider = (IViewerLabelProvider) getLabelProvider();
			itemProvider.updateLabel(updateLabel, element);
            		
			colorAndFontCollector.setUsedDecorators();
			
			if(updateLabel.hasNewBackground())
				colorAndFontCollector.setBackground(updateLabel.getBackground());
			
			if(updateLabel.hasNewForeground())
				colorAndFontCollector.setForeground(updateLabel.getForeground());
			
			if(updateLabel.hasNewFont())
				colorAndFontCollector.setFont(updateLabel.getFont());
			return;
		} 
		
		if(getLabelProvider() instanceof ILabelProvider){
			ILabelProvider labelProvider = (ILabelProvider) getLabelProvider();
			updateLabel.setText(labelProvider.getText(element));
			updateLabel.setImage(labelProvider.getImage(element));
		}
	
	}
	
	/**
	 * Build a label up for the element using the supplied label provider.
	 * @param updateLabel The ViewerLabel to collect the result in
	 * @param element The element being decorated.