Community
Participate
Working Groups
If one has an IObservableList/WritableList and uses SideEffectFactory then an access to stream() is not recognized as access and thus on changes the side effect does not occur. Example: > IObservableList<Object> list = new WritableList<>(); > ISideEffectFactory factory = WidgetSideEffects.createFactory(parent); > factory.create(() -> list.stream(), stream -> { > //will only be called once on init and never again >} it seems that simply an override of that method is missing calling getterCalled(), the same apply for the parallelStream()/spliterator() method.
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/168855
*** Bug 566696 has been marked as a duplicate of this bug. ***
This is a status report for my work on this problem. I started to investigate the details, and I ran into a number of issues that complicate the solution, which made me run out of time. That's why I haven't gotten in contact about this for a while. Issues: * Maybe the delegating IObservableCollection-implementations should delegate calls to `stream` (and the other methods) directly to their delegate object? * There are two more new methods on Collection in Java 8: toArray(IntFunction) and removeIf. Maybe those should be overridden and marked with @TrackedGetter? * removeIf doesn't work on the observable collections. That is because the returned iterator does not support removal, even when the collection itself is mutable. * I started to add tests to ObservableCollectionContractTest (and friends). Then I discovered that IObservableList and IObservableSet handles observable-tracker differently. Nothing about this is unsolvable, it's just a number of annoying complications. I don't know when I will be able to finish this.