Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » is it dangerous to replace java.util.ArrayList by ca.odell.glazedlists.FilterList ?
is it dangerous to replace java.util.ArrayList by ca.odell.glazedlists.FilterList ? [message #1554935] Fri, 09 January 2015 14:05 Go to next message
Vincent Lorenzo is currently offline Vincent LorenzoFriend
Messages: 248
Registered: June 2010
Location: Paris Saclay, France
Senior Member
Hello everybody,
this topic is for the people which have some experience with EventList and FilterList.

in the Eclipse Papyrus project, we developed table using ArrayList to store rows and columns elements. It works very fine, but now we would like to integrate filter capapbilities to our tables. So I would like to replace my ArrayList by FilterList to be able to use DefaultGlazedListsFilterStrategy like in the nattable example.

Do you now if I can have problems doing this or it is a safe change?

Regards,
--
Vincent Lorenzo
Re: is it dangerous to replace java.util.ArrayList by ca.odell.glazedlists.FilterList ? [message #1554954 is a reply to message #1554935] Fri, 09 January 2015 14:18 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Typically this should be safe. GlazedLists are "simply" a transformation on top of another Collection like ArrayList. So I don't know a reason for not using it.
Re: is it dangerous to replace java.util.ArrayList by ca.odell.glazedlists.FilterList ? [message #1554962 is a reply to message #1554954] Fri, 09 January 2015 14:22 Go to previous messageGo to next message
Vincent Lorenzo is currently offline Vincent LorenzoFriend
Messages: 248
Registered: June 2010
Location: Paris Saclay, France
Senior Member
Hi Dirk, thank you for you answer.
I was afraid to do it, because in the Tree Table developed in Papyrus, I already replaced ArrayList by TreeList for rows and TreeList.clear() and TreeList.remove() gave me some problems due to the hierarchy.

Regards,
--
Vincent Lorenzo
Re: is it dangerous to replace java.util.ArrayList by ca.odell.glazedlists.FilterList ? [message #1554970 is a reply to message #1554962] Fri, 09 January 2015 14:27 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Well, TreeList is officially a "developer preview". And AFAIK you should avoid operating on TreeList itself. For removing and clearing you should operate on an underlying EventList, since the events fired then should be correctly handled by the TreeList.
Previous Topic:Multi Edit Caret Location
Next Topic:NatTable in Eclipse editor
Goto Forum:
  


Current Time: Tue Apr 16 23:18:16 GMT 2024

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

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

Back to the top