1 package net.sourceforge.phpeclipse.phpeditor;
4 * (c) Copyright IBM Corp. 2000, 2001.
9 import java.util.Iterator;
11 import org.eclipse.jface.text.source.IAnnotationModel;
15 * Filters problems based on their types.
17 public class ProblemAnnotationIterator implements Iterator {
19 private Iterator fIterator;
20 private IProblemAnnotation fNext;
21 private boolean fSkipIrrelevants;
23 public ProblemAnnotationIterator(IAnnotationModel model, boolean skipIrrelevants) {
24 fIterator= model.getAnnotationIterator();
25 fSkipIrrelevants= skipIrrelevants;
30 while (fIterator.hasNext()) {
31 Object next= fIterator.next();
32 if (next instanceof IProblemAnnotation) {
33 IProblemAnnotation a= (IProblemAnnotation) next;
34 if (fSkipIrrelevants) {
49 * @see Iterator#hasNext()
51 public boolean hasNext() {
56 * @see Iterator#next()
58 public Object next() {
67 * @see Iterator#remove()
69 public void remove() {
70 throw new UnsupportedOperationException();