Community
Participate
Working Groups
Build Identifier: 20090920-1017 The TreeViewerUpdater does not always rebuild its children when an element is replaced. I am using databinding with a tree that has its input as an observeable detail. When the detail changes, the TreeViewerUpdater calls the replace() method to replace the item, and if the TreeViewer.replace() method is used the items children are not re-evaluated after the change. This leads to the new item displaying the entries of its previous item in the tree or no children. The +/- also becomes invalid. It also means the IObservableFactory is never called to re-request the new children. The API for TreeViewer.replace() states it should only be used for a with an SWT.VIRTUAL style. I managed to force the TreeViewer updater to remove and insert the item by adding a dummy ViewerFilter to the try and this solved the problem. Perhpas TreeViewer.replace() will work if a refresh can be called on the viewer afterwards? I have not tested this however. Reproducible: Always
Created attachment 176960 [details] Patch Matt, does this fix the problem for you?
(In reply to comment #1) > Created an attachment (id=176960) [details] > Patch > > Matt, does this fix the problem for you? Matt, thanks, yes this does indeed fix the problem.
Boris, +1?
+1
Released to HEAD > 20100831