Community
Participate
Working Groups
I tried implementing decorators on the SWT Table widget with directions from eclipse help. Here's an example implemention: public class MyLabelProvider extends LabelProvider implements ITableLabelProvider I found that only the items in the first table column were decorated while the other table columns were left blank. Other viewers such as the TreeViewer decorate all the tree items instead of just the first one so there seems to be an inconsistency in having decorators work for all viewers. This problem blocks our product from having tables display decorators in other columns besides the first column. This is critical since tables and trees are used many times to display the same type of data that need to use decorators. I have a to fix this problem by subclassing the org.eclipse.jface.viewers.TableViewer class, but eclipse documentation states that this class should not be subclassed.
We don't currently support decorators for columns. You can do this in your ITableLabelProvider without using the decorator mechanism.
Hi Tod, thanks for investigating this, (In reply to comment #1) > We don't currently support decorators for columns. Is there a specific reason why columns are not supported? Also, could it be documented in the eclipse decorator info that columns are not supported. >You can do this in your ITableLabelProvider without using the decorator >mechanism. I'm not sure I understand, are you saying I can decorate without using the decorator mechanism?
Mostly that decorators work on decorating an object not a property of the object (which is generally how people use tables - one object per row). I was suggesting that you make your ITableLabelProvider handle the changes to any icons or text you want to make. Recall that a decorator affects every viewer that shows a type. If we made tables support it it wouldn't be clear which row we wanted to modify. Right now it is consistent with other viewers.
There is no plan to work on this feature
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.