code: private void runPendingUpdates() {
  		IResource[] markerResources= null;
  		IResource[] annotationResources= null;
  		synchronized (this) {
  			if (!fResourcesWithMarkerChanges.isEmpty()) {
  				markerResources= (IResource[]) fResourcesWithMarkerChanges.toArray(new IResource[fResourcesWithMarkerChanges.size()]);
  				fResourcesWithMarkerChanges.clear();
  			}
  			if (!fResourcesWithAnnotationChanges.isEmpty()) {
  				annotationResources= (IResource[]) fResourcesWithAnnotationChanges.toArray(new IResource[fResourcesWithAnnotationChanges.size()]);
  				fResourcesWithAnnotationChanges.clear();
  			}
  		}
  		Object[] listeners= fListeners.getListeners();
  		for (int i= 0; i < listeners.length; i++) {
  			IProblemChangedListener curr= (IProblemChangedListener) listeners[i];
  			if (markerResources != null) {
  				curr.problemsChanged(markerResources, true);
  			}
  			if (annotationResources != null) {
  				curr.problemsChanged(annotationResources, false);
  			}
  		}
  	}
docs: Notify all IProblemChangedListener. Must be called in the display thread.