Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » [DataBinding] Removing several elements and ObservableListContentProvider
[DataBinding] Removing several elements and ObservableListContentProvider [message #558156] Fri, 10 September 2010 11:27 Go to next message
Yury Chernikov is currently offline Yury Chernikov
Messages: 9
Registered: July 2009
Junior Member
Hi,

ObservableListContentProvider removes elements from a viewer one by one even in case when all these elements was removed from a model at one stroke.
This logic is implemented at ObservableListContentProvider.java:124
As result
1) it is not so fast in case with big number of elements
2) I listen selection of the viewer, and I see several intermediate notifications.

Could you recommend me a way how I can override this behavior?

Yury.
Re: [DataBinding] Removing several elements and ObservableListContentProvider [message #558172 is a reply to message #558156] Fri, 10 September 2010 11:58 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5344
Registered: July 2009
Senior Member
Write your own ContentProvider (Copying the code from the old one) but
in reality the would be nice if one could configure the behaviour so
that e.g. the ListDiff holds a certain amount of data simply a refresh
is done instead of remove.

Tom

Am 10.09.10 13:27, schrieb Yury Chernikov:
> Hi,
>
> ObservableListContentProvider removes elements from a viewer one by one
> even in case when all these elements was removed from a model at one
> stroke.
> This logic is implemented at ObservableListContentProvider.java:124
> As result
> 1) it is not so fast in case with big number of elements
> 2) I listen selection of the viewer, and I see several intermediate
> notifications.
>
> Could you recommend me a way how I can override this behavior?
>
> Yury.
Re: [DataBinding] Removing several elements and ObservableListContentProvider [message #560108 is a reply to message #558172] Tue, 21 September 2010 08:54 Go to previous message
Yury Chernikov is currently offline Yury Chernikov
Messages: 9
Registered: July 2009
Junior Member
thank you for reply,
I've implemented my content provider in described way,
(also I've solved problem of several notifications from EMF RemoveCommand)
It works.
Previous Topic:Insert Text in Editor
Next Topic:[Databinding] - Custom Widgets
Goto Forum:
  


Current Time: Tue Sep 30 18:00:16 GMT 2014

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

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