/** * Re-populates this model with annotations for all markers retrieved * from the maker source via <code>retrieveMarkers</code>. * * @throws CoreException if there is a problem getting the markers */ private void catchupWithMarkers() throws CoreException { for (Iterator e=getAnnotationIterator(false); e.hasNext();) { Annotation a= (Annotation) e.next(); if (a instanceof MarkerAnnotation) removeAnnotation(a, false); } IMarker[] markers= retrieveMarkers(); if (markers != null) { for (int i= 0; i < markers.length; i++) addMarkerAnnotation(markers[i]); } }
/** * Re-populates this model with annotations for all markers retrieved * from the maker source via <code>retrieveMarkers</code>. * * @throws CoreException if there is a problem getting the markers */ private void catchupWithMarkers() throws CoreException { for (Iterator<Annotation> e=getAnnotationIterator(false); e.hasNext();) { Annotation a= e.next(); if (a instanceof MarkerAnnotation) removeAnnotation(a, false); } IMarker[] markers= retrieveMarkers(); if (markers != null) { for (int i= 0; i < markers.length; i++) addMarkerAnnotation(markers[i]); } }
/** * Updates the annotation corresponding to the given marker which has changed * in some way. * <p> * Subclasses may override.</p> * * @param marker the marker */ protected void modifyMarkerAnnotation(IMarker marker) { MarkerAnnotation a= getMarkerAnnotation(marker); if (a != null) { Position p= createPositionFromMarker(marker); if (p != null) { a.update(); modifyAnnotationPosition(a, p, false); } } else addMarkerAnnotation(marker); }
/** * Updates the annotation corresponding to the given marker which has changed * in some way. * <p> * Subclasses may override.</p> * * @param marker the marker */ protected void modifyMarkerAnnotation(IMarker marker) { MarkerAnnotation a= getMarkerAnnotation(marker); if (a != null) { Position p= createPositionFromMarker(marker); if (p != null) { a.update(); modifyAnnotationPosition(a, p, false); } } else addMarkerAnnotation(marker); }