/** * Creates and returns a new annotation model event. Subclasses may override. * * @return a new and empty annotation model event * @since 3.0 */ protected AnnotationModelEvent createAnnotationModelEvent() { return new AnnotationModelEvent(this); }
@Override public void annotationChanged(Annotation annotation) { testIfProblemMarker(annotation); super.annotationChanged(annotation); }
@Override public void annotationAdded(Annotation annotation) { super.annotationAdded(annotation); testIfProblemMarker(annotation); }
AnnotationModelEvent ame= new AnnotationModelEvent(this, false); for (Iterator<QuickDiffRangeDifference> it= fAdded.iterator(); it.hasNext(); ) { QuickDiffRangeDifference rd= it.next(); ame.annotationAdded(rd.getDiffRegion(fDifferences, fLeftDocument)); ame.annotationRemoved(rd.getDiffRegion(fDifferences, fLeftDocument)); ame.annotationChanged(rd.getDiffRegion(fDifferences, fLeftDocument));
@Override public void modelChanged(AnnotationModelEvent event) { if (!event.isValid()) return; if (event.isWorldChange()) { update(); return; Annotation[] annotations= event.getAddedAnnotations(); int length= annotations.length; for (int i= 0; i < length; i++) { annotations= event.getRemovedAnnotations(); length= annotations.length; for (int i= 0; i < length; i++) { annotations= event.getChangedAnnotations(); length= annotations.length; for (int i= 0; i < length; i++) {
/** * Adds the given annotation to the set of annotations that are reported as * being removed from the model. If this event is considered a world * change, it is no longer so after this method has successfully finished. * * @param annotation the removed annotation * @since 3.0 */ public void annotationRemoved(Annotation annotation) { annotationRemoved(annotation, null); }
if (DEBUG && event != null && event.isWorldChange()) { System.out.println("AP: WORLD CHANGED, stack trace follows:"); //$NON-NLS-1$ new Throwable().printStackTrace(System.out);
AnnotationModelEvent ame= new AnnotationModelEvent(this, false); for (Iterator it= fAdded.iterator(); it.hasNext(); ) { RangeDifference rd= (RangeDifference) it.next(); ame.annotationAdded(rd.getDiffRegion(fDifferences, fLeftDocument)); ame.annotationRemoved(rd.getDiffRegion(fDifferences, fLeftDocument)); ame.annotationChanged(rd.getDiffRegion(fDifferences, fLeftDocument));
@Override public void modelChanged(AnnotationModelEvent event) { if (!event.isValid()) return; if (event.isWorldChange()) { update(); return; Annotation[] annotations= event.getAddedAnnotations(); int length= annotations.length; for (int i= 0; i < length; i++) { annotations= event.getRemovedAnnotations(); length= annotations.length; for (int i= 0; i < length; i++) { annotations= event.getChangedAnnotations(); length= annotations.length; for (int i= 0; i < length; i++) {
/** * Adds the given annotation to the set of annotations that are reported as * being removed from the model. If this event is considered a world * change, it is no longer so after this method has successfully finished. * * @param annotation the removed annotation * @since 3.0 */ public void annotationRemoved(Annotation annotation) { annotationRemoved(annotation, null); }
if (DEBUG && event != null && event.isWorldChange()) { System.out.println("AP: WORLD CHANGED, stack trace follows:"); //$NON-NLS-1$ new Throwable().printStackTrace(System.out);
AnnotationModelEvent ame= new AnnotationModelEvent(this, false); for (Iterator<QuickDiffRangeDifference> it= fAdded.iterator(); it.hasNext(); ) { QuickDiffRangeDifference rd= it.next(); ame.annotationAdded(rd.getDiffRegion(fDifferences, fLeftDocument)); ame.annotationRemoved(rd.getDiffRegion(fDifferences, fLeftDocument)); ame.annotationChanged(rd.getDiffRegion(fDifferences, fLeftDocument));
if (event == null || event.isWorldChange()) { isWorldChange= true; Annotation[] removedAnnotations= event.getRemovedAnnotations(); for (Annotation annotation : removedAnnotations) { Decoration decoration= highlightedDecorationsMap.remove(annotation); Annotation[] changedAnnotations= event.getChangedAnnotations(); for (Annotation annotation : changedAnnotations) { boolean isHighlighting= false; e= Arrays.asList(event.getAddedAnnotations()).iterator();
/** * Creates and returns a new annotation model event. Subclasses may override. * * @return a new and empty annotation model event * @since 3.0 */ protected AnnotationModelEvent createAnnotationModelEvent() { return new AnnotationModelEvent(this); }
@Override public void annotationRemoved(Annotation annotation, Position position) { super.annotationRemoved(annotation, position); testIfProblemMarker(annotation); }
@Override public void annotationChanged(Annotation annotation) { testIfProblemMarker(annotation); super.annotationChanged(annotation); }
@Override public void annotationAdded(Annotation annotation) { super.annotationAdded(annotation); testIfProblemMarker(annotation); }
if (event == null || event.isWorldChange()) { isWorldChange= true; Annotation[] removedAnnotations= event.getRemovedAnnotations(); for (int i= 0, length= removedAnnotations.length; i < length; i++) { Annotation annotation= removedAnnotations[i]; Annotation[] changedAnnotations= event.getChangedAnnotations(); for (int i= 0, length= changedAnnotations.length; i < length; i++) { Annotation annotation= changedAnnotations[i]; e= Arrays.asList(event.getAddedAnnotations()).iterator();
@Override public synchronized void modelChanged(final IAnnotationModel model) { if (DEBUG) System.err.println("AP: OLD API of AnnotationModelListener called"); //$NON-NLS-1$ modelChanged(new AnnotationModelEvent(model)); }
@Override public void annotationRemoved(Annotation annotation, Position position) { super.annotationRemoved(annotation, position); testIfProblemMarker(annotation); }