Iterator e= new ProblemAnnotationIterator(fModel); while (e.hasNext()) { IProblemAnnotation pa= (IProblemAnnotation) e.next(); if (pa.isProblem()) { Annotation a= (Annotation) pa; Position p= fModel.getPosition(a); fProblemPositions.add(p); }
try { fIsSettingModel= true; fModel.addAnnotationModelListener(this); } finally { fIsSettingModel= false;
	private void setModel(IAnnotationModel model) {						if (fModel != model) {			if (fModel != null)				fModel.removeAnnotationModelListener(this);			fModel= model;			if (fModel != null)				fModel.addAnnotationModelListener(this);		}				if (fProblemPositions != null) {			fProblemPositions.clear();			if (fModel != null) {				Iterator e= new ProblemAnnotationIterator(fModel);				while (e.hasNext()) {					IProblemAnnotation pa= (IProblemAnnotation) e.next();					if (pa.isProblem()) {						Annotation a= (Annotation) pa;						Position p= fModel.getPosition(a);						fProblemPositions.add(p);					}				}			}		}	}