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 net.sourceforge.phpdt.core.ICompilationUnit;
17 import org.eclipse.swt.graphics.Image;
18 import org.eclipse.swt.widgets.Display;
21 * Interface of annotations representing markers and problems.
23 * @see org.eclipse.core.resources.IMarker
24 * @see net.sourceforge.phpdt.core.compiler.IProblem
26 public interface IJavaAnnotation {
29 * @see org.eclipse.jface.text.source.Annotation#getType()
34 * @see org.eclipse.jface.text.source.Annotation#isPersistent()
36 boolean isPersistent();
39 * @see org.eclipse.jface.text.source.Annotation#isMarkedDeleted()
41 boolean isMarkedDeleted();
44 * @see org.eclipse.jface.text.source.Annotation#getText()
49 * Returns whether this annotation is overlaid.
51 * @return <code>true</code> if overlaid
56 * Returns the overlay of this annotation.
58 * @return the annotation's overlay
61 IJavaAnnotation getOverlay();
64 * Returns an iterator for iterating over the annotation which are overlaid
67 * @return an iterator over the overlaid annotaions
69 Iterator getOverlaidIterator();
72 * Adds the given annotation to the list of annotations which are overlaid
73 * by this annotations.
76 * the problem annoation
78 void addOverlaid(IJavaAnnotation annotation);
81 * Removes the given annotation from the list of annotations which are
82 * overlaid by this annotation.
85 * the problem annoation
87 void removeOverlaid(IJavaAnnotation annotation);
90 * Tells whether this annotation is a problem annotation.
92 * @return <code>true</code> if it is a problem annotation
97 * Returns the compilation unit corresponding to the document on which the
98 * annotation is set or <code>null</code> if no corresponding
99 * co0mpilationunit exists.
101 ICompilationUnit getCompilationUnit();
103 String[] getArguments();
107 Image getImage(Display display);