Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » [databinding] How to observe EMF model changes?
[databinding] How to observe EMF model changes? [message #1708746] Sat, 19 September 2015 22:36 Go to next message
Jens Bürger is currently offline Jens BürgerFriend
Messages: 47
Registered: October 2012
Member
Hello everyone,

I have an EMF model which especially contains Strings at various classes.

Using the SWT designer I successfully created a data binding. The only thing that does not work is that the UI reacts to changes of the model.

According to this vogella tutorial (http://www.vogella.com/tutorials/EclipseDataBinding/article.html#databinding_propertychange), this can be realized by adding PropertyChangeSupport.

As I saw that EMF generated "eNotify" calls in the model code, I'm asking if there isn't a more convenient, directly through EMF supported way to achieve bi-directional data binding?
Re: [databinding] How to observe EMF model changes? [message #1708783 is a reply to message #1708746] Mon, 21 September 2015 07:57 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6417
Registered: July 2009
Senior Member
For EMF use EMF-Databinding it looks like you are using
BeanObservables/BeanProperties

Tom

On 20.09.15 00:37, Jens Bürger wrote:
> Hello everyone,
>
> I have an EMF model which especially contains Strings at various classes.
>
> Using the SWT designer I successfully created a data binding. The only
> thing that does not work is that the UI reacts to changes of the model.
>
> According to this vogella tutorial
> (http://www.vogella.com/tutorials/EclipseDataBinding/article.html#databinding_propertychange),
> this can be realized by adding PropertyChangeSupport.
>
> As I saw that EMF generated "eNotify" calls in the model code, I'm
> asking if there isn't a more convenient, directly through EMF supported
> way to achieve bi-directional data binding?
Re: [databinding] How to observe EMF model changes? [message #1708885 is a reply to message #1708783] Tue, 22 September 2015 09:14 Go to previous message
Jens Bürger is currently offline Jens BürgerFriend
Messages: 47
Registered: October 2012
Member
Now it works, thanks!
The problem was that SWT designer did not display the EMF-button for databinding, just beans and widgets.
I added some databinding plugins as dependencies and also the plugin project containing my EMF model.
Previous Topic:problem with the CheckboxCellEditor
Next Topic:[Databinding] Relation to ReactiveX?
Goto Forum:
  


Current Time: Wed Nov 21 02:30:18 GMT 2018

Powered by FUDForum. Page generated in 0.02632 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top