1 package net.sourceforge.phpeclipse.phpeditor;
4 * (c) Copyright IBM Corp. 2000, 2001.
8 import java.util.Iterator;
10 import org.eclipse.jface.text.source.IAnnotationModel;
13 * Filters problems based on their types.
15 public class ProblemAnnotationIterator implements Iterator {
17 private Iterator fIterator;
19 private IProblemAnnotation fNext;
21 private boolean fSkipIrrelevants;
23 public ProblemAnnotationIterator(IAnnotationModel model,
24 boolean skipIrrelevants) {
25 fIterator = model.getAnnotationIterator();
26 fSkipIrrelevants = skipIrrelevants;
31 while (fIterator.hasNext()) {
32 Object next = fIterator.next();
33 if (next instanceof IProblemAnnotation) {
34 IProblemAnnotation a = (IProblemAnnotation) next;
35 if (fSkipIrrelevants) {
50 * @see Iterator#hasNext()
52 public boolean hasNext() {
57 * @see Iterator#next()
59 public Object next() {
68 * @see Iterator#remove()
70 public void remove() {
71 throw new UnsupportedOperationException();