Bug 52275 Package Explorer error marker icon not updated
I have a custom builder which is invoked after a save (CTRL+S) that identifies problems with resources in my non-Java project and marks the resource with errors (or clears them as needed). This seems to work fine except that the problem marker icons in the Package Explorer are for some reason not automatically updated. Selecting the 'Go Into' context menu option and then navigating back again shows the correct problem marker icon state. Alternatively, closing and opening the project/eclipse displays the correct icon state. Is there something that needs to be called in order to 'refresh' the problem markers in the Package Explorer view? This is happening under Linux (RH9) using Eclipse 2.1.2 Comments from newsgroup: "The decorator handles this case the problem updater does not. "
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemMarkerManager.java
import org.eclipse.jface.text.source.IAnnotationModelListenerExtension;
import org.eclipse.jface.util.ListenerList;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitAnnotationModelEvent;
import org.eclipse.jdt.internal.ui.util.SWTUtil;
/**
 * Listens to resource deltas and filters for marker changes of type IMarker.PROBLEM
 * Viewers showing error ticks should register as listener to
 * this type.
 */
public class ProblemMarkerManager implements IResourceChangeListener, IAnnotationModelListener , IAnnotationModelListenerExtension {
	/**
	 * Visitors used to look if the element change delta containes a marker change.
	 */
	private static class ProjectErrorVisitor implements IResourceDeltaVisitor {
		private HashSet fChangedElements; 
		
		public ProjectErrorVisitor(HashSet changedElements) {
			fChangedElements= changedElements;
		}
			
		public boolean visit(IResourceDelta delta) throws CoreException {
			IResource res= delta.getResource();
			if (res instanceof IProject && delta.getKind() == IResourceDelta.CHANGED) {
				try {
					IProject project= (IProject) res;
					if (!project.isAccessible() || !project.hasNature(JavaCore.NATURE_ID)) {
						
						return false;