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
}
	}
	
	/**
	 * Adds a listener for problem marker changes.
	 */
	public void addListener(IProblemChangedListener listener) {
		if (fListeners.isEmpty()) { 
			JavaPlugin.getWorkspace().addResourceChangeListener(this);
		}
		fListeners.add(listener);
	}
	/**
	 * Removes a <code>IProblemChangedListener</code>.
	 */	
	public void removeListener(IProblemChangedListener listener) {
		fListeners.remove(listener);
		if (fListeners.isEmpty()) {
			JavaPlugin.getWorkspace().removeResourceChangeListener(this);
		}
	}
	
	private void fireChanges(Set changes) {
		Object[] listeners= fListeners.getListeners();
		for (int i= 0; i < listeners.length; i++) {
			IProblemChangedListener curr= (IProblemChangedListener) listeners[i];
			curr.problemsChanged(changes);
		}			
	}
}