/** * @see IAnnotationModelListener#modelChanged(IAnnotationModel) */ @Override public void modelChanged(IAnnotationModel model) { for (IAnnotationModelListener listener : fListenerList) { listener.modelChanged(model); } }
/** * @see IAnnotationModelListener#modelChanged(IAnnotationModel) */ @Override public void modelChanged(IAnnotationModel model) { for (IAnnotationModelListener listener : fListenerList) { listener.modelChanged(model); } }
/** * @see IAnnotationModelListener#modelChanged(IAnnotationModel) */ public void modelChanged(IAnnotationModel model) { Object[] listeners= fListenerList.getListeners(); for (int i= 0; i < listeners.length; i++) { ((IAnnotationModelListener) listeners[i]).modelChanged(model); } }
/** * @see IAnnotationModelListener#modelChanged(IAnnotationModel) */ public void modelChanged(IAnnotationModel model) { Object[] listeners= fListenerList.getListeners(); for (int i= 0; i < listeners.length; i++) { ((IAnnotationModelListener) listeners[i]).modelChanged(model); } }
/** * 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 */ protected void fireModelChanged(AnnotationModelEvent event) { 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 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 */ protected void fireModelChanged(AnnotationModelEvent event) { 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 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 */ protected void fireModelChanged(AnnotationModelEvent event) { ArrayList v= new ArrayList(fAnnotationModelListeners); Iterator e= v.iterator(); while (e.hasNext()) { IAnnotationModelListener l= (IAnnotationModelListener)e.next(); if (l instanceof IAnnotationModelListenerExtension) ((IAnnotationModelListenerExtension)l).modelChanged(event); else l.modelChanged(this); } }
@Override public void addAnnotationModelListener(IAnnotationModelListener listener) { if (!fAnnotationModelListeners.contains(listener)) { fAnnotationModelListeners.add(listener); if (listener instanceof IAnnotationModelListenerExtension) { IAnnotationModelListenerExtension extension= (IAnnotationModelListenerExtension) listener; AnnotationModelEvent event= createAnnotationModelEvent(); event.markSealed(); extension.modelChanged(event); } else listener.modelChanged(this); } }
@Override public void addAnnotationModelListener(IAnnotationModelListener listener) { if (!fAnnotationModelListeners.contains(listener)) { fAnnotationModelListeners.add(listener); if (listener instanceof IAnnotationModelListenerExtension) { IAnnotationModelListenerExtension extension= (IAnnotationModelListenerExtension) listener; AnnotationModelEvent event= createAnnotationModelEvent(); event.markSealed(); extension.modelChanged(event); } else listener.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); } }
/** * 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); } }