Hello,
I have a weird problem concerning the registration of adapters.
I do as follows:
In a GEF EditPart I add:
private final EContentAdapter adapter = new EContentAdapter() {
public void notifyChanged(Notification notification) {
System.out.println("Notfication received from the data model. Data model has changed!!!");
}
};
then I add the two methods to register the adapter which it actually does (I debugged it):
/** {@inheritDoc} */
@Override
public void activate() {
super.activate();
signal.eAdapters().add(adapter);
}
/** {@inheritDoc} */
@Override
public void deactivate() {
super.activate();
signal.eAdapters().remove(adapter);
}
In a properties view I then edit the model via binding:
bindingContext.bindValue(
WidgetProperties.text(SWT.Modify).observe(control),
EMFProperties.value(feature).observe(observable));
The model is indeed changed because if I close the editor with the editPart and reopen it the values have changed. BUT the notifyChange method is never invoked. WHY????
Any help is appreciated!