X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/phpeditor/ProblemAnnotationIterator.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/phpeditor/ProblemAnnotationIterator.java deleted file mode 100644 index 7895116..0000000 --- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/phpeditor/ProblemAnnotationIterator.java +++ /dev/null @@ -1,73 +0,0 @@ -package net.sourceforge.phpeclipse.phpeditor; - -/* - * (c) Copyright IBM Corp. 2000, 2001. - * All Rights Reserved. - */ - -import java.util.Iterator; - -import org.eclipse.jface.text.source.IAnnotationModel; - -/** - * Filters problems based on their types. - */ -public class ProblemAnnotationIterator implements Iterator { - - private Iterator fIterator; - - private IProblemAnnotation fNext; - - private boolean fSkipIrrelevants; - - public ProblemAnnotationIterator(IAnnotationModel model, - boolean skipIrrelevants) { - fIterator = model.getAnnotationIterator(); - fSkipIrrelevants = skipIrrelevants; - skip(); - } - - private void skip() { - while (fIterator.hasNext()) { - Object next = fIterator.next(); - if (next instanceof IProblemAnnotation) { - IProblemAnnotation a = (IProblemAnnotation) next; - if (fSkipIrrelevants) { - if (a.isRelevant()) { - fNext = a; - return; - } - } else { - fNext = a; - return; - } - } - } - fNext = null; - } - - /* - * @see Iterator#hasNext() - */ - public boolean hasNext() { - return fNext != null; - } - - /* - * @see Iterator#next() - */ - public Object next() { - try { - return fNext; - } finally { - skip(); - } - } - - /* - * @see Iterator#remove() - */ - public void remove() { - throw new UnsupportedOperationException(); - } -}