예제 #1
0
 @Override
 @SuppressWarnings({"unchecked"})
 protected void removeAnnotation(Annotation annotation, boolean fireModelChanged) {
   Position position = getPosition(annotation);
   synchronized (getLockObject()) {
     Object cached = fReverseMap.get(position);
     if (cached instanceof List) {
       List<Annotation> list = (List<Annotation>) cached;
       list.remove(annotation);
       if (list.size() == 1) {
         fReverseMap.put(position, list.get(0));
         list.clear();
       }
     } else if (cached instanceof Annotation) {
       fReverseMap.remove(position);
     }
   }
   super.removeAnnotation(annotation, fireModelChanged);
 }