for (AnnotationFS annotation : selectedAnnotations) {
selection.add(annotation);
}
Collections.sort(selection, new AnnotationComparator());
} else {
Map<Integer, AnnotationFS> view = getView(getAnnotationMode());
AnnotationFS annotation = view.get(getSourceViewer().getTextWidget().getCaretOffset());