| Summary: | [Databinding] - SimplePropertyObservableValue.doGetValue() fires off value change event to its listeners | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Vasanth Velusamy <vasanthv16> |
| Component: | UI | Assignee: | Matthew Hall <qualidafial> |
| Status: | RESOLVED WONTFIX | QA Contact: | Matthew Hall <qualidafial> |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 4.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Vasanth Velusamy
If the issue is deemed to be a valid one, and if the solution I specified is acceptable, I can provide a patch for it, along with a test. This behavior is by design. This works around a shortcoming where certain observables / properties have no listener API, and so can be modified without our observable ever knowing about it. Therefore we make a best effort inside SimplePropertyObservableValue (and friends) to pick up on property changes that happened outside the control of the observable, and fire those change notifications as soon as we learn about the change. This is the only way that any bindings from any of unwatchable properties could function. You can query any property value without side effects by using the IValueProperty instance directly: Object currentValue = property.getValue(source); Marking wontfix. Current behavior is by design, and this behavior can be worked around by using IValueProperty.getValue(obj) instead of IObservableValue.getValue(). If it can be demonstrated that this behavior is generally harmful then I'm happy to reconsider, however from your comments it appears that the above workaround would suffice. |