Community
Participate
Working Groups
Build Identifier: Version: Indigo Service Release 1, Build id: 20110916-0149 Calling refresh method on any JFace Viewers causes that data must be provided two times if binding via Property API is used. Binding was defined in WindowBuilderPro. I think there is no reason for calling method providing data two times especially if getting them is time consuming. The failure is caused by method getElements in the ObservableCollection. public Object[] getElements(Object inputElement) { if (observableCollection == null) return new Object[0]; knownElements.addAll(observableCollection); if (realizedElements != null) { if (!realizedElements.equals(knownElements)) { asyncUpdateRealizedElements(); } } >>>> return observableCollection.toArray(); } In my view this line should be different, maybe knownElements.toArray(), but I didn't verify it. Jan Reproducible: Always Steps to Reproduce: I will enclose an example.
Created attachment 208800 [details] Example with binding and refresh After button "Refresh" is pressed, data are provided two times. If data should be provided, message box is displayed.
Created attachment 209165 [details] Patch that removes problem with the refresh This patch fixes the problem with getting data after refresh and even during initialization, but I am not sure if there are not side effects. I didn't get why there several collections of the elements. Is there any document the architecture and how they should / could be used?
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. If you have further information on the current state of the bug, please add it. 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. If the bug is still relevant, please remove the "stalebug" whiteboard tag.