Community
Participate
Working Groups
Self-properties would make it easy to observe a List as a mutable IObservableList, a Set as an IObservableSet, and a Map as an IObservableMap. Additionally we could make a self-property IValueProperty for observing an Object as an unmodifiable IObservableValue. In the former 3 cases, doSet<List|Set|Map> methods would just cast the property source to a List, Set or Map, and apply the diff to it. In the latter, doSetValue() would be silently ignored. The doGet<List|Set|Map> methods should clone the source object so that diffs can be computed appropriately (since the observables just cache whatever collection is returned instead of cloning it--otherwise we end up computing an empty diff every time). Something like this would also satisfy the use case in bug 213848, I think
Created attachment 124903 [details] Patch
Created attachment 124904 [details] mylyn/context/zip
The JavaDoc in Properties.java has copy/paste errors. Otherwise, +1
Created attachment 125021 [details] Fixed copy-paste errors
Created attachment 125022 [details] mylyn/context/zip
Released to HEAD > 20090206