Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Strange behaviour of EContentAdapter
Strange behaviour of EContentAdapter [message #716943] Thu, 18 August 2011 17:07 Go to previous message
Georg G. is currently offline Georg G.
Messages: 4
Registered: August 2011
Junior Member
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!
 
Read Message
Read Message
Previous Topic:Get started with EMF Facet
Next Topic:[Texo] Questions on Data Generator Feature
Goto Forum:
  


Current Time: Thu May 23 09:57:27 EDT 2013

Powered by FUDForum. Page generated in 0.01664 seconds