Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forums[EMF Forms] Custom Databinding converters
https://www.eclipse.org/forums/index.php/mv/msg/1083280/1750404/#msg_1750404
I have a model that contains EAttribute with annotations used to define the engineering units such as Celcius or kilometers etc. These annotations are based on the JScience package (javax.measure.unit.Unit). I use EMFForms Renderer Service to contribute custom SWT control to display the units. This works well. Now, I'd like to know how if it is possible to contribute custom converters to the EMFForms databindings. This would allow me to convert data specified in an engineering format into a different but compatible engineering format (e.g. km/h into miles/h, lbs to kg). I do not know where to implement and specify the databinding converters.
Thanks for your help.]]>Regent LArcheveque2016-12-20T18:28:51-00:00Re: [EMF Forms] Custom Databinding converters
https://www.eclipse.org/forums/index.php/mv/msg/1083280/1750465/#msg_1750465
as you already have custom controls, you can override the org.eclipse.emf.ecp.view.spi.core.swt.SimpleControlSWTControlSWTRenderer.createBindings(Control) method.
Take a look at the NumberControlSWTRenderer how it overrides the createBindings with custom converter etc.
Cheers,
Eugen
--
Get professional Eclipse developer support: http://eclipsesource.com/en/services/developer-support/]]>Eugen Neufeld2016-12-21T10:35:26-00:00Re: [EMF Forms] Custom Databinding converters
https://www.eclipse.org/forums/index.php/mv/msg/1083280/1750476/#msg_1750476
Regent LArcheveque2016-12-21T13:56:38-00:00