public void notifyChanged(Notification notification) { // last target if(notification.getNotifier() != null && getTarget() != null && notification.getNotifier() == ((EnumerationLiteral) getTarget()).getEnumerationType()) { ((IChangeNotifier) getAdapterFactory()).removeListener(this); fireNotifyChanged(new ViewerNotification(notification, getTarget(), false, true)); ((IChangeNotifier) getAdapterFactory()).addListener(this); } // other targets if(targets != null){ for (Notifier target : targets){ if(notification.getNotifier() != null && target != null && notification.getNotifier() == ((EnumerationLiteral) getTarget()).getEnumerationType()) { ((IChangeNotifier) getAdapterFactory()).removeListener(this); fireNotifyChanged(new ViewerNotification(notification, target, false, true)); ((IChangeNotifier) getAdapterFactory()).addListener(this); } }} }
/** * This constructs an instance from a factory and a notifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public EnumerationLiteralItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); if(adapterFactory instanceof IChangeNotifier) { IChangeNotifier cn = (IChangeNotifier) adapterFactory; changeListener = new ChangeListener(); cn.addListener(changeListener); } }
/** * This constructs an instance from a factory and a notifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public TransitionItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); if(adapterFactory instanceof IChangeNotifier) { IChangeNotifier cn = (IChangeNotifier) adapterFactory; changeListener = new ChangeListener(); cn.addListener(changeListener); } }
/** * This constructs an instance from a factory and a notifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public FSMItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); if (adapterFactory instanceof IChangeNotifier) { IChangeNotifier cn = (IChangeNotifier) adapterFactory; changeListener = new ChangeListener(); cn.addListener(changeListener); } }
public void dispose() { super.dispose(); if(changeListener != null) { ((IChangeNotifier)getAdapterFactory()).removeListener(changeListener); } }
public void dispose() { super.dispose(); if (changeListener != null) { ((IChangeNotifier) getAdapterFactory()).removeListener(changeListener); } }
public AdapterFactoryTreeTimelineContentProvider(AdapterFactory adapterFactory) { this.provider = new AdapterFactoryContentProvider(adapterFactory); if (adapterFactory instanceof IChangeNotifier) { ((IChangeNotifier)adapterFactory).addListener(listener); } }
@Override public void activate() { if (this.adapterFactory instanceof IChangeNotifier) { ((IChangeNotifier) this.adapterFactory).addListener(listener); } }
@Override public void dispose() { if (this.adapterFactory instanceof IChangeNotifier) { ((IChangeNotifier) this.adapterFactory).removeListener(listener); } }