IAnnotationModel aModel = viewer.getAnnotationModel();
for(int i=0;i<allAnnotations.length;i++) {
AnnotationPosition ap = (AnnotationPosition)allAnnotations[i];
Position p = new Position(ap.position().offset+offset,ap.position().length);
if (ap.annotation() instanceof ProjectionAnnotation) {
pModel.addAnnotation(ap.annotation(),p);
// Don't collapse this in here in case there are
// non-collapsed nested annotations
// that haven't been added to the model yet.
if (ap.collapsed()) {