1 /*******************************************************************************
2 * Copyright (c) 2000, 2003 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpeclipse.phpeditor;
13 import java.util.Iterator;
15 import org.eclipse.swt.graphics.Image;
16 import org.eclipse.swt.widgets.Display;
19 * Interface of annotations representing markers
22 * @see org.eclipse.core.resources.IMarker
23 * @see org.eclipse.jdt.core.compiler.IProblem
25 public interface IJavaAnnotation {
27 AnnotationType getAnnotationType();
29 boolean isTemporary();
33 String[] getArguments();
38 Image getImage(Display display);
41 * Returns whether this annotation is relavant.
43 * If the annotation is overlaid then it is not
44 * relevant. After all overlays have been removed
45 * the annotation might either become relevant again
49 * @return <code>true</code> if relevant
55 * Returns whether this annotation is overlaid.
57 * @return <code>true</code> if overlaid
62 * Returns an iterator for iterating over the
63 * annotation which are overlaid by this annotation.
65 * @return an iterator over the overlaid annotaions
67 Iterator getOverlaidIterator();
70 * Adds the given annotation to the list of
71 * annotations which are overlaid by this annotations.
73 * @param annotation the problem annoation
75 void addOverlaid(IJavaAnnotation annotation);
78 * Removes the given annotation from the list of
79 * annotations which are overlaid by this annotation.
81 * @param annotation the problem annoation
83 void removeOverlaid(IJavaAnnotation annotation);
86 * Tells whether this annotation is a problem
89 * @return <code>true</code> if it is a problem annotation