Community
Participate
Working Groups
Created attachment 248595 [details] example implementation The tableviewer doesnt update elements if a filter is active and the content of the viewer is changing. i.e. 1) add element (integer value 1) -> element is visible 2) Activate filter (filter all elments % 2 != 0) 3) element is invisible 4) change element value to 2 5) element is still invisble, but should be visible
From the example you posted I see that you call update() in between 4.) and 5.). Does refresh() work correctly?
yes refresh works, but if the filter is still active the item is filtered again if it is invalid. So you have to call update() and afterthat refresh(). ... tableViewer.update(new Object[]{model}, properties); tableViewer.refresh(); ... I thought, refresh() reloads the complete model and we just wanna update one or more columns.(performance?)
(In reply to Fabian Miehe from comment #2) > I thought, refresh() reloads the complete model and we just wanna update one > or more columns.(performance?) Correct, I just wanted to know if refresh works. Please create a Gerrit review for the fix in TableViewer.update
(In reply to Lars Vogel from comment #3) > (In reply to Fabian Miehe from comment #2) > > I thought, refresh() reloads the complete model and we just wanna update one > > or more columns.(performance?) > > Correct, I just wanted to know if refresh works. Please create a Gerrit > review for the fix in TableViewer.update Any update here Fabian?
I think I misunderstood the example. The viewer can not model the content of the viewer, for this you would need to use data binding.
The model is the same, but if a single property value inside the model is changed, the filter doesnt work. The ViewerFilter recognizes add or remove (Structural Changes), but if a single property in a existing table row changes the filter doesnt work. So you have to remove and then add a table row, if the content of an exitisting row is changed. If you always have to filter inside the model(this is possible), the ViewerFilter is useless (for us :-) ). We use a lot of tables with dynmanic content. e.g. if you have aircraft data, the latitude and longitude values change frequently, but the name of the aircraft is still the same. So it is only neccessary to update the lat or lon value not the whole table row.
Fabian, I think I misunderstood your case. Reopening, I agree this sounds like a bug. Are you planning to provide a patch?
New Gerrit change created: https://git.eclipse.org/r/43406
I changed the update method inside the TableViewer. But maybe i would be better to change the update method inside the base class ColumnViewer
Sorry Fabian, we try to integrate that into early 4.6.
Mass move to 4.7.
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. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. 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. -- The automated Eclipse Genie.