1 package net.sourceforge.phpeclipse.phpeditor;
4 * (c) Copyright IBM Corp. 2000, 2001.
9 import java.util.Iterator;
10 import org.eclipse.jface.text.source.IAnnotationModel;
14 * Filters problems based on their types.
16 public class ProblemAnnotationIterator implements Iterator {
18 private Iterator fIterator;
19 private IProblemAnnotation fNext;
20 private boolean fSkipIrrelevants;
22 public ProblemAnnotationIterator(IAnnotationModel model, boolean skipIrrelevants) {
23 fIterator= model.getAnnotationIterator();
24 fSkipIrrelevants= skipIrrelevants;
29 while (fIterator.hasNext()) {
30 Object next= fIterator.next();
31 if (next instanceof IProblemAnnotation) {
32 IProblemAnnotation a= (IProblemAnnotation) next;
33 if (fSkipIrrelevants) {
48 * @see Iterator#hasNext()
50 public boolean hasNext() {
55 * @see Iterator#next()
57 public Object next() {
66 * @see Iterator#remove()
68 public void remove() {
69 throw new UnsupportedOperationException();