1 11 package org.eclipse.ant.internal.ui.editor.text; 12 13 import org.eclipse.jface.text.source.Annotation; 14 import org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess; 15 16 public class AnnotationAccess extends DefaultMarkerAnnotationAccess { 17 18 21 public Object getType(Annotation annotation) { 22 if (annotation instanceof IXMLAnnotation) { 23 IXMLAnnotation xmlAnnotation= (IXMLAnnotation) annotation; 24 if (xmlAnnotation.isRelevant()) { 25 return xmlAnnotation.getType(); 26 } 27 } 28 29 return super.getType(annotation); 30 } 31 32 35 public boolean isTemporary(Annotation annotation) { 36 if (annotation instanceof IXMLAnnotation) { 37 IXMLAnnotation xmlAnnotation= (IXMLAnnotation) annotation; 38 if (xmlAnnotation.isRelevant()) { 39 return xmlAnnotation.isTemporary(); 40 } 41 } 42 return super.isTemporary(annotation); 43 } 44 } | Popular Tags |