Home > Back-end >  Non-Deprecated Data Binding for SWT/JFace
Non-Deprecated Data Binding for SWT/JFace

Time:12-15

I have been toying around with Eclipse plug-in development recently and when I tried to bind an SWT Text to a String in my data model using the Eclipse Bindings tab, the code it generated was relying on deprecated classes like WidgetPropertiesand PojoProperties.

Are there any newer classes I missed out on? Is there an easy way to do the data binding without having to suppress warnings?

CodePudding user response:

For WidgetProperties use the class in the org.eclipse.jface.databinding.swt.typed package rather than the deprecated classes in org.eclipse.jface.databinding.swt.

For PojoProperties and BeanProperties the replacement is in org.eclipse.core.databinding.beans.typed rather than org.eclipse.core.databinding.beans

ViewerProperties in org.eclipse.jface.databinding.viewer has also been replaced with a class in org.eclipse.jface.databinding.viewers.typed

The classes in the xxx.typed package have been modified to use generics.

  • Related