Skip to main content



      Home
Home » Eclipse Projects » JFace » why AbstractTableViewer.doUpdateItem ignores IBaseLabelProvider.isLabelProperty?
why AbstractTableViewer.doUpdateItem ignores IBaseLabelProvider.isLabelProperty? [message #7668] Mon, 18 May 2009 10:45 Go to next message
Eclipse UserFriend
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.isLabelProperty? [message #8833 is a reply to message #7668] Tue, 19 May 2009 12:24 Go to previous messageGo to next message
Eclipse UserFriend
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

"Vadim Mironov" <vadik.mironov@gmail.com> wrote in message
news:19c429ce0d13980e8c1858ab62cae586$1@www.eclipse.org...
> 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 Go to previous message
Eclipse UserFriend
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
Previous Topic:Re: list viewer inline editing?
Next Topic:Syntax Coloring
Goto Forum:
  


Current Time: Mon Jun 02 20:21:17 EDT 2025

Powered by FUDForum. Page generated in 0.02836 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top