public class DataNotifier
extends org.eclipse.emf.ecore.util.EContentAdapter
addAdapter(EObject, Adapter)),
addAdapter(Class, Adapter)).
Notification.getNotifier() method.
It is possible to use both ways of registration for different adapters.
An adapter registered for a given model element is always removed when this element is removed explicitly from the model.
That does not apply to adapters registered for a class (until DataNotifier is garbage collected).
| Constructor and Description |
|---|
DataNotifier(org.eclipse.emf.edit.domain.EditingDomain editingDomain)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAdapter(java.lang.Class<?> cls,
org.eclipse.emf.common.notify.Adapter adapter)
Add an adapter for model elements that implement given class.
|
void |
addAdapter(org.eclipse.emf.ecore.EObject element,
org.eclipse.emf.common.notify.Adapter adapter)
Add an adapter for given model element.
|
org.eclipse.emf.edit.domain.EditingDomain |
getEditingDomain() |
void |
notifyChanged(org.eclipse.emf.common.notify.Notification notification) |
void |
remove(org.eclipse.emf.common.notify.Adapter adapter)
Remove adapter from registered ones.
|
public DataNotifier(org.eclipse.emf.edit.domain.EditingDomain editingDomain)
public void addAdapter(java.lang.Class<?> cls,
org.eclipse.emf.common.notify.Adapter adapter)
cls - The Java type for looked after elements.adapter - A not null Adapter listening to changes.public void addAdapter(org.eclipse.emf.ecore.EObject element,
org.eclipse.emf.common.notify.Adapter adapter)
element - A not null model element.adapter - A not null Adapter listening to changes.public void notifyChanged(org.eclipse.emf.common.notify.Notification notification)
notifyChanged in interface org.eclipse.emf.common.notify.AdapternotifyChanged in class org.eclipse.emf.ecore.util.EContentAdapterAdapterImpl.notifyChanged(org.eclipse.emf.common.notify.Notification)public void remove(org.eclipse.emf.common.notify.Adapter adapter)
adapter - A not null adapter to remove.public org.eclipse.emf.edit.domain.EditingDomain getEditingDomain()