1 19 20 package org.netbeans.modules.ant.debugger; 21 22 import org.openide.text.Annotatable; 23 import org.openide.text.Annotation; 24 import org.openide.text.Line; 25 import org.openide.util.NbBundle; 26 27 28 33 public class DebuggerAnnotation extends Annotation { 34 35 36 public static final String BREAKPOINT_ANNOTATION_TYPE = 37 new String ("Breakpoint"); 38 39 public static final String DISABLED_BREAKPOINT_ANNOTATION_TYPE = 40 new String ("DisabledBreakpoint"); 41 42 public static final String CONDITIONAL_BREAKPOINT_ANNOTATION_TYPE = 43 new String ("CondBreakpoint"); 44 45 public static final String DISABLED_CONDITIONAL_BREAKPOINT_ANNOTATION_TYPE = 46 new String ("DisabledCondBreakpoint"); 47 48 public static final String CURRENT_LINE_ANNOTATION_TYPE = 49 new String ("CurrentPC"); 50 51 public static final String CURRENT_LINE_ANNOTATION_TYPE2 = 52 new String ("CurrentPC2"); 53 54 public static final String CURRENT_LINE_PART_ANNOTATION_TYPE = 55 new String ("CurrentPCLinePart"); 56 57 public static final String CURRENT_LINE_PART_ANNOTATION_TYPE2 = 58 new String ("CurrentPC2LinePart"); 59 60 public static final String CALL_STACK_FRAME_ANNOTATION_TYPE = 61 new String ("CallSite"); 62 63 private Annotatable annotatable; 64 private String type; 65 66 67 public DebuggerAnnotation (String type, Annotatable annotatable) { 68 this.type = type; 69 this.annotatable = annotatable; 70 attach (annotatable); 71 } 72 73 public String getAnnotationType () { 74 return type; 75 } 76 77 public String getShortDescription () { 78 if (type == BREAKPOINT_ANNOTATION_TYPE) 79 return NbBundle.getBundle (DebuggerAnnotation.class).getString 80 ("TOOLTIP_BREAKPOINT"); else 82 if (type == DISABLED_BREAKPOINT_ANNOTATION_TYPE) 83 return NbBundle.getBundle (DebuggerAnnotation.class).getString 84 ("TOOLTIP_DISABLED_BREAKPOINT"); else 86 if (type == CONDITIONAL_BREAKPOINT_ANNOTATION_TYPE) 87 return NbBundle.getBundle (DebuggerAnnotation.class).getString 88 ("TOOLTIP_CONDITIONAL_BREAKPOINT"); else 90 if (type == DISABLED_CONDITIONAL_BREAKPOINT_ANNOTATION_TYPE) 91 return NbBundle.getBundle (DebuggerAnnotation.class).getString 92 ("TOOLTIP_DISABLED_CONDITIONAL_BREAKPOINT"); else 94 if (type == CURRENT_LINE_ANNOTATION_TYPE) 95 return NbBundle.getMessage 96 (DebuggerAnnotation.class, "TOOLTIP_CURRENT_PC"); else 98 if (type == CURRENT_LINE_ANNOTATION_TYPE2) 99 return NbBundle.getMessage 100 (DebuggerAnnotation.class, "TOOLTIP_CURRENT_PC_2"); else 102 if (type == CURRENT_LINE_PART_ANNOTATION_TYPE) 103 return NbBundle.getMessage 104 (DebuggerAnnotation.class, "TOOLTIP_CURRENT_PC"); else 106 if (type == CALL_STACK_FRAME_ANNOTATION_TYPE) 107 return NbBundle.getBundle (DebuggerAnnotation.class).getString 108 ("TOOLTIP_CALLSITE"); return null; 110 } 111 } 112 | Popular Tags |