MarkChain chain = getLayer().getMarkChain();
/** Remove annotation */ public void removeAnnotation(AnnotationDesc anno) { // find LineAnnotations for the mark LineAnnotations lineAnnos = (LineAnnotations) lineAnnotationsByMark.get(anno.getMark()); int line = lineAnnos.getLine(); // remove annotation from the line lineAnnos.removeAnnotation(anno); // check if this mark is referenced or not. If not, remove it if (!lineAnnos.isMarkStillReferenced(anno.getMark())) { lineAnnotationsByMark.remove(anno.getMark()); MarkChain chain = getLayer().getMarkChain(); chain.removeMark(anno.getOffset()); } // if there is no more annotations on the line, remove LineAnnotations if (lineAnnos.getCount() == 0) { lineAnnotationsArray.remove(lineAnnotationsArray.indexOf(lineAnnos)); } // clear the mark from annotation anno.setMark(null); // remove listener on changes of annotation type anno.removePropertyChangeListener(l); // notify view that must be redrawn refreshLine(line); }
MarkChain chain = getLayer().getMarkChain(); try {
MarkChain chain = getLayer().getMarkChain(); try { chain.addMark(anno.getOffset());