if (o instanceof MarkerAnnotation) { MarkerAnnotation a= (MarkerAnnotation) o; Position p= createPositionFromMarker(a.getMarker()); if (p != null) { removeAnnotation(a, false); if (o instanceof MarkerAnnotation) { MarkerAnnotation a= (MarkerAnnotation) o; Position p= createPositionFromMarker(a.getMarker()); if (p != null) try {
if (o instanceof MarkerAnnotation) { MarkerAnnotation a= (MarkerAnnotation) o; Position p= createPositionFromMarker(a.getMarker()); if (p != null) { removeAnnotation(a, false); if (o instanceof MarkerAnnotation) { MarkerAnnotation a= (MarkerAnnotation) o; Position p= createPositionFromMarker(a.getMarker()); if (p != null) try {
/** * Creates an annotation for the given marker and adds it to this model. * Does nothing if the marker is not acceptable to this model. * * @param marker the marker * @see #isAcceptable(IMarker) */ protected final void addMarkerAnnotation(IMarker marker) { if (isAcceptable(marker)) { Position p= createPositionFromMarker(marker); if (p != null) try { MarkerAnnotation annotation= createMarkerAnnotation(marker); if (annotation != null) addAnnotation(annotation, p, false); } catch (BadLocationException e) { // ignore invalid position } } }
/** * Creates an annotation for the given marker and adds it to this model. * Does nothing if the marker is not acceptable to this model. * * @param marker the marker * @see #isAcceptable(IMarker) */ protected final void addMarkerAnnotation(IMarker marker) { if (isAcceptable(marker)) { Position p= createPositionFromMarker(marker); if (p != null) try { MarkerAnnotation annotation= createMarkerAnnotation(marker); if (annotation != null) addAnnotation(annotation, p, false); } catch (BadLocationException e) { // ignore invalid position } } }
position= createPositionFromMarker(marker);
position= createPositionFromMarker(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); }
/** * 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); }