Bug 92851 [Viewers] [api] protected field StructuredViewer.colorAndFontCollector
3.1 HEAD colorAndFontCollector protected ColorAndFontCollector colorAndFontCollector This read-write field was added as API in the 3.1 cycle. Exposing fields as API (other than public static final ones) is bad practice because a client can change the field and there's nothing the class can do to prevent or even track that change. All access to read-write field should be through accessor methods, including access from subclasses. Also, this field is missing an @since 3.1 tag.
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.