duplicate entries in TableViewer [message #460411] |
Thu, 25 August 2005 05:52  |
Eclipse User |
|
|
|
Hi,
I've a quick query concerning an org.eclipse.jface.viewers.ViewerSorter.
I want to ensure that there are no duplicate entries in my TableViewer.
So, when the compare() method of the ViewerSorter is called and 0 is
returned (i.e. first element is equal to the second element), I want to be
able to identify this occurance.
Then I can choose not to add this duplicate item. I add items to the
TableViewer using the add(Object element) method.
Thanks,
Shane
|
|
|
Re: duplicate entries in TableViewer [message #460416 is a reply to message #460411] |
Thu, 25 August 2005 09:43  |
Eclipse User |
|
|
|
Well, AFAIK the sorter is called *after* you have inserted the elements.
I think filtering could only be done before inserting the data (maybe at
content provider level).
Yves
shane wrote:
> Hi,
>
> I've a quick query concerning an
> org.eclipse.jface.viewers.ViewerSorter. I want to ensure that there are
> no duplicate entries in my TableViewer. So, when the compare() method
> of the ViewerSorter is called and 0 is returned (i.e. first element is
> equal to the second element), I want to be able to identify this occurance.
>
> Then I can choose not to add this duplicate item. I add items to the
> TableViewer using the add(Object element) method.
> Thanks, Shane
>
|
|
|
Powered by
FUDForum. Page generated in 0.11446 seconds