Community
Participate
Working Groups
I am using a ValueBinding with a model observable of type String and a target observable of type int. When the binding is initialized, the model observable's value is propagated to the target observable (see ValueBinding.postInit()). In this process, the String is converted to an int. If this conversion fails, the ValueBinding's validation status is set to ERROR. However, after updateModelToTarget() postInit() calls validateTargetToModel(). This overwrites the validation status with OK and hides the conversion error. I think, postInit() should only call validateTargetToModel() if the validation status is OK after updateModelToTarget was executed. However, the JavaDoc of updateModelToTarget() states "There is no guarantee that the state will have been updated by the time this call returns.", so this problem does not seem to be that easy to fix.
Could you please attach a simple project with steps to reproduce the issue ?
Created attachment 264859 [details] JUnit test, which discovers the described bug.
The attached project contains a JUnit test, which fails because the validation status is OK after the binding is initialized.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.