For those who have used Eclipse Forms in their projects, I’m sure a common request was to include some type of fancy validation using the lovely message manager in Forms. If you use JFace Databinding also in that project, you probably wrote some code to help link databinding’s validation status to the Forms message manager. If you believe this should be common code available in the SDK, please voice your comments on this bug. Better yet, if you have code to donate, feel free to do that also.
Posts Tagged with “databinding”
JFace Databinding is Cool
By Chris Aniszczyk
I have been getting to know JFace Databinding lately. It was on my TODO list of Eclipse technologies to learn and although things were rough in the beginning, I’m starting really appreciate things. For example, I had a use case where I was binding a value to a text control. By default, the model was being updated on every keystroke which could be fine. However, if you have a complex UI that does fancy validation, it can cause unexpected results like refreshes that you just don’t want. A simple and more natural thing is only to commit a change to the model after the user is done typing instead of every keystroke. The solution in JFace Databinding is simple…
SWTObservables.observeDelayedValue(400, myObservable)
There’s also a nice code snippet that you can run to see how the code works.