/** * Informs all annotation model listeners that this model has been changed * as described in the annotation model event. The event is sent out * to all listeners implementing <code>IAnnotationModelListenerExtension</code>. * All other listeners are notified by just calling <code>modelChanged(IAnnotationModel)</code>. * * @param event the event to be sent out to the listeners * @since 2.0 */ protected void fireModelChanged(AnnotationModelEvent event) { event.markSealed(); if (event.isEmpty()) return; ArrayList<IAnnotationModelListener> v= new ArrayList<>(fAnnotationModelListeners); Iterator<IAnnotationModelListener> e= v.iterator(); while (e.hasNext()) { IAnnotationModelListener l= e.next(); if (l instanceof IAnnotationModelListenerExtension) ((IAnnotationModelListenerExtension) l).modelChanged(event); else if (l != null) l.modelChanged(this); } }
/** * Informs all annotation model listeners that this model has been changed * as described in the annotation model event. The event is sent out * to all listeners implementing <code>IAnnotationModelListenerExtension</code>. * All other listeners are notified by just calling <code>modelChanged(IAnnotationModel)</code>. * * @param event the event to be sent out to the listeners * @since 2.0 */ protected void fireModelChanged(AnnotationModelEvent event) { event.markSealed(); if (event.isEmpty()) return; ArrayList<IAnnotationModelListener> v= new ArrayList<>(fAnnotationModelListeners); Iterator<IAnnotationModelListener> e= v.iterator(); while (e.hasNext()) { IAnnotationModelListener l= e.next(); if (l instanceof IAnnotationModelListenerExtension) ((IAnnotationModelListenerExtension) l).modelChanged(event); else if (l != null) l.modelChanged(this); } }