Search code examples
javadata-bindingeclipse-pluginswtjface

Non-Deprecated Data Binding for SWT/JFace


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?


Solution

  • 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.