Bug 75200 [Decorators] Color and Font decorators dissapear in Package Explorer
3.0 M2 The CVS font/color decorations dissapear in the packages explorer, or do not apply to all the elements they should. I will investigate on our end, but this seems to be a package explorer problem since the navigator always shows these decorations correctly.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ResourceToItemsMapper.java
import org.eclipse.core.resources.IResource;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Item;
import org.eclipse.jface.viewers.ContentViewer;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.IViewerLabelProvider;
import org.eclipse.jface.viewers.ViewerLabel;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
/**
 * Helper class for updating error markers and other decorators that work on resources.
 * Items are mapped to their element's underlying resource.
 * Method <code>resourceChanged</code> updates all items that are affected from the changed
 * elements.
 */
public class ResourceToItemsMapper {
	private static final int NUMBER_LIST_REUSE= 10;
	
	private HashMap fResourceToItem;
	private Stack fReuseLists;
	
	private ContentViewer fContentViewer;
	public ResourceToItemsMapper(ContentViewer viewer) {
		fResourceToItem= new HashMap();
		fReuseLists= new Stack();
		
		fContentViewer= viewer;
	}
	/**
	 * Must be called from the UI thread.