1 11 package org.eclipse.jface.text.source; 12 13 14 22 public class Annotation { 23 24 29 public final static String TYPE_UNKNOWN= "org.eclipse.text.annotation.unknown"; 31 32 36 private String fType; 37 41 private boolean fIsPersistent= false; 42 46 private boolean fMarkedAsDeleted= false; 47 51 private String fText; 52 53 54 57 protected Annotation() { 58 this(null, false, null); 59 } 60 61 70 public Annotation(String type, boolean isPersistent, String text) { 71 fType= type; 72 fIsPersistent= isPersistent; 73 fText= text; 74 } 75 76 82 public Annotation(boolean isPersistent) { 83 this(null, isPersistent, null); 84 } 85 86 93 public boolean isPersistent() { 94 return fIsPersistent; 95 } 96 97 103 public void setType(String type) { 104 fType= type; 105 } 106 107 113 public String getType() { 114 return fType == null? TYPE_UNKNOWN : fType; 115 } 116 117 124 public void markDeleted(boolean deleted) { 125 fMarkedAsDeleted= deleted; 126 } 127 128 135 public boolean isMarkedDeleted() { 136 return fMarkedAsDeleted; 137 } 138 139 145 public void setText(String text) { 146 fText= text; 147 } 148 149 155 public String getText() { 156 return fText; 157 } 158 } 159 | Popular Tags |