Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.ui.externaltools/Ant Editor/org/eclipse/ui/externaltools/internal/ant/editor/text/XMLProblemAnnotation.java')
-rw-r--r--org.eclipse.ui.externaltools/Ant Editor/org/eclipse/ui/externaltools/internal/ant/editor/text/XMLProblemAnnotation.java129
1 files changed, 0 insertions, 129 deletions
diff --git a/org.eclipse.ui.externaltools/Ant Editor/org/eclipse/ui/externaltools/internal/ant/editor/text/XMLProblemAnnotation.java b/org.eclipse.ui.externaltools/Ant Editor/org/eclipse/ui/externaltools/internal/ant/editor/text/XMLProblemAnnotation.java
deleted file mode 100644
index 90dabcd4b..000000000
--- a/org.eclipse.ui.externaltools/Ant Editor/org/eclipse/ui/externaltools/internal/ant/editor/text/XMLProblemAnnotation.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.externaltools.internal.ant.editor.text;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.externaltools.internal.ant.editor.outline.IProblem;
-import org.eclipse.ui.texteditor.MarkerAnnotation;
-
-/**
- * Annotation representating an <code>IProblem</code>.
- */
-public class XMLProblemAnnotation extends Annotation implements IXMLAnnotation {
-
- private List fOverlaids;
- private IProblem fProblem;
- private AnnotationType fType;
-
-
- public XMLProblemAnnotation(IProblem problem) {
-
- fProblem= problem;
- setLayer(MarkerAnnotation.PROBLEM_LAYER + 1);
-
- if (fProblem.isError())
- fType= AnnotationType.ERROR;
- else if (fProblem.isWarning())
- fType= AnnotationType.WARNING;
- else
- fType= AnnotationType.INFO;
- }
-
- /*
- * @see Annotation#paint
- */
- public void paint(GC gc, Canvas canvas, Rectangle r) {
- }
-
- /*
- * @see IXMLAnnotation#getImage(Display)
- */
- public Image getImage(Display display) {
- return null;
- }
-
- /*
- * @see IXMLAnnotation#getMessage()
- */
- public String getMessage() {
- return fProblem.getMessage();
- }
-
- /*
- * @see IXMLAnnotation#isTemporary()
- */
- public boolean isTemporary() {
- return true;
- }
-
- /*
- * @see IXMLAnnotation#isProblem()
- */
- public boolean isProblem() {
- return fType == AnnotationType.WARNING || fType == AnnotationType.ERROR;
- }
-
- /*
- * @see IXMLAnnotation#isRelevant()
- */
- public boolean isRelevant() {
- return true;
- }
-
- /*
- * @see IXMLAnnotation#hasOverlay()
- */
- public boolean hasOverlay() {
- return false;
- }
-
- /*
- * @see IXMLAnnotation#addOverlaid(IXMLAnnotation)
- */
- public void addOverlaid(IXMLAnnotation annotation) {
- if (fOverlaids == null)
- fOverlaids= new ArrayList(1);
- fOverlaids.add(annotation);
- }
-
- /*
- * @see IXMLAnnotation#removeOverlaid(IXMLAnnotation)
- */
- public void removeOverlaid(IXMLAnnotation annotation) {
- if (fOverlaids != null) {
- fOverlaids.remove(annotation);
- if (fOverlaids.size() == 0)
- fOverlaids= null;
- }
- }
-
- /*
- * @see IXMLAnnotation#getOverlaidIterator()
- */
- public Iterator getOverlaidIterator() {
- if (fOverlaids != null)
- return fOverlaids.iterator();
- return null;
- }
-
- public AnnotationType getAnnotationType() {
- return fType;
- }
-}

Back to the top