Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » duplicate entries in TableViewer
duplicate entries in TableViewer [message #460411] Thu, 25 August 2005 09:52 Go to next message
shane is currently offline shaneFriend
Messages: 11
Registered: July 2009
Junior Member
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 13:43 Go to previous message
Yves Harms is currently offline Yves HarmsFriend
Messages: 80
Registered: July 2009
Member
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
>
Previous Topic:Add icon in a TableTree
Next Topic:How do I build the 64 bit version of SWT GTK?
Goto Forum:
  


Current Time: Fri Apr 26 21:22:51 GMT 2024

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

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

Back to the top