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
24 * @see org.eclipse.core.resources.IMarker
25 * @see org.eclipse.jdt.core.compiler.IProblem
27 public interface IJavaAnnotation {
30 * @see org.eclipse.jface.text.source.Annotation#getType()
35 * @see org.eclipse.jface.text.source.Annotation#isPersistent()
37 boolean isPersistent();
40 * @see org.eclipse.jface.text.source.Annotation#isMarkedDeleted()
42 boolean isMarkedDeleted();
45 * @see org.eclipse.jface.text.source.Annotation#getText()
50 * Returns whether this annotation is overlaid.
52 * @return <code>true</code> if overlaid
57 * Returns the overlay of this annotation.
59 * @return the annotation's overlay
62 IJavaAnnotation getOverlay();
65 * Returns an iterator for iterating over the
66 * annotation which are overlaid by this annotation.
68 * @return an iterator over the overlaid annotaions
70 Iterator getOverlaidIterator();
73 * Adds the given annotation to the list of
74 * annotations which are overlaid by this annotations.
76 * @param annotation the problem annoation
78 void addOverlaid(IJavaAnnotation annotation);
81 * Removes the given annotation from the list of
82 * annotations which are overlaid by this annotation.
84 * @param annotation the problem annoation
86 void removeOverlaid(IJavaAnnotation annotation);
89 * Tells whether this annotation is a problem
92 * @return <code>true</code> if it is a problem annotation
97 * Returns the compilation unit corresponding to the document on which the annotation is set
98 * or <code>null</code> if no corresponding co0mpilationunit exists.
100 ICompilationUnit getCompilationUnit();
102 String[] getArguments();
106 Image getImage(Display display);