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
int newSeverity= markerDeltas[i].getMarker().getAttribute(IMarker.SEVERITY, -1);
						if (newSeverity != severity)
							return true; 
					}
				}
			}
			return false;
		}
	}
	private ListenerList fListeners;
	
	
	public ProblemMarkerManager() {
		fListeners= new ListenerList(5);
	}
	/*
	 * @see IResourceChangeListener#resourceChanged
	 */	
	public void resourceChanged(IResourceChangeEvent event) {
		HashSet changedElements= new HashSet();
		
		try {
			IResourceDelta delta= event.getDelta();
			if (delta != null)
				delta.accept(new ProjectErrorVisitor(changedElements));
		} catch (CoreException e) {
			JavaPlugin.log(e.getStatus());
		}
		if (changedElements.size() > 0) {
			fireChanges(changedElements);