Bug 11416 Error markers not shown in parents when resource added
Using 20020214 Eclipse build. If you add a new resource to a project and that resource has an error, the Java Packages view will show an X on the resource but not on its ancestor containers. This could happen, for instance, when adding a resource from a Team repository. The problem is in org.eclipse.jdt.internal.ui.viewsupport.ProblemMarkerManager.checkInvalidate(). The following should be changed, from: ============================ if (kind == IResourceDelta.REMOVED || (kind == IResourceDelta.CHANGED && isErrorDelta(delta))) { ============================ to: ============================ if (kind == IResourceDelta.REMOVED || ((kind == IResourceDelta.ADDED || kind == IResourceDelta.CHANGED) && isErrorDelta(delta))) { ============================
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemMarkerManager.java
/*
 * (c) Copyright IBM Corp. 2000, 2001.
 * All Rights Reserved.
 */
package org.eclipse.jdt.internal.ui.viewsupport;
import java.util.HashSet;
import java.util.Set;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IMarkerDelta;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jface.util.ListenerList;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.internal.ui.JavaPlugin;
/**
 * 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 {