why AbstractTableViewer.doUpdateItem ignores IBaseLabelProvider.isLabelProperty? [message #7668] |
Mon, 18 May 2009 10:45  |
Eclipse User |
|
|
|
While using update(Object item, String[] properties) method on TableViewer
I've noticed that viewer asks only viewer's label provider for whether it
should update element, but when it goes to
AbstractTableViewer.doUpdateItem, it completely ignores label providers
associated with columns thus updating all columns for given item. Is there
anything that prevents from asking column label provider whether the
given cell should be updated or not according to properties given?
|
|
|
|
Re: why AbstractTableViewer.doUpdateItem ignores IBaseLabelProvider.isLabelPrope [message #8843 is a reply to message #8833] |
Wed, 20 May 2009 02:48  |
Eclipse User |
|
|
|
Yes and I'm doing this already as most of the time I know what type of
updates my column viewer will provide whether it will be text, background
or font. But this is a bit different to what I have in mind. My use case
is the following: let's say I have 15 columns or so and two of them are
fast updating and some others have data coming from third party library.
So when I update my fast moving numbers I also query third party library
via getText and those calls I'd like to remove with the help of property
that says only fast moving columns should update as there is no need to
query slow code where nothing has changed.
Summarizing I see two reasons for this feature, one as indicated above
allows us not to think hard about implementation of general
ColumnLabelProvider, concentrating only on fast updating cells.
Second reason is that naturally I would expect just by looking at
ColumnLabelProvider that isLabelProperty will work in the very same
fashion as for BaseLabelProvider and ViewerSorter, but on column level.
Well, the second reason is not a reason per se, as I'm sure there is a big
disclaimer somewhere in the docs or code saying that it will not work for
columns, but frankly I was anticipating that kind of behaviour when I
first came across isLabelProperty.
Boris Bokowski wrote:
> Hi Vadim,
> Why is it important to you that the framework asks whether individual cells
> should be updated? You can always override
> org.eclipse.jface.viewers.ColumnLabelProvider.update(ViewerC ell) and do the
> minimal amount of work if you would like to optimize.
> Boris
|
|
|
Powered by
FUDForum. Page generated in 0.02836 seconds