1 19 20 package org.netbeans.modules.editor.errorstripe; 21 22 import java.awt.Color ; 23 import org.netbeans.editor.AnnotationDesc; 24 import org.netbeans.editor.AnnotationType; 25 import org.netbeans.modules.editor.errorstripe.privatespi.Mark; 26 import org.netbeans.modules.editor.errorstripe.privatespi.Status; 27 28 32 public class AnnotationMark implements Mark { 33 34 private AnnotationDesc annotation; 35 36 37 public AnnotationMark(AnnotationDesc annotation) { 38 this.annotation = annotation; 39 } 40 41 public Status getStatus() { 42 AnnotationType type = annotation.getAnnotationTypeInstance(); 43 AnnotationType.Severity severity = type.getSeverity(); 45 46 48 return AnnotationViewDataImpl.get(severity); 49 } 50 51 public Color getEnhancedColor() { 52 AnnotationType type = annotation.getAnnotationTypeInstance(); 53 54 return type.getCustomSidebarColor(); 55 } 56 57 public int[] getAssignedLines() { 58 return new int[] {annotation.getLine(), annotation.getLine()}; 59 } 60 61 public String getShortDescription() { 62 return annotation.getShortDescription(); 63 } 64 65 public int getType() { 66 return TYPE_ERROR_LIKE; 67 } 68 69 public int getPriority() { 70 return annotation.getAnnotationTypeInstance().getPriority(); 71 } 72 73 public AnnotationDesc getAnnotationDesc() { 74 return annotation; 75 } 76 77 } 78 | Popular Tags |