Bug 94231 - [Viewers] DeferredContentProvider refreshes twice on setInput
Summary: [Viewers] DeferredContentProvider refreshes twice on setInput
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: helpwanted
Depends on:
Blocks: 509006
  Show dependency tree
 
Reported: 2005-05-10 00:10 EDT by Brock Janiczak CLA
Modified: 2020-06-21 16:32 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brock Janiczak CLA 2005-05-10 00:10:22 EDT
Version: 3.1.0
Build id: I20050506-1600

I am playing around with the new deferred content provider support in JFace and
as surprised to my concurrent model asked to get all values twice in quick
succession.  This could be the correct behaviour, but it did seem a bit
excessive to me.  I couldn't find an example implementation of a concurrent
model in the workspace, so my implementation may be incorrect.

DeferredContentProvider#inputChanged is calling refresh once in setLimit and
once in setFilter
Comment 1 Stefan Xenos CLA 2005-05-10 13:27:47 EDT
You're right, this shouldn't happen.
Comment 2 Stefan Xenos CLA 2005-05-10 13:31:05 EDT
FYI, you shouldn't be calling setInput very often. Unless you really are
attaching the viewer to a different model, you should set the input once and
then change the contents of the input to match changes in the model.
Comment 3 Brock Janiczak CLA 2005-05-10 18:51:40 EDT
Thanks for the info.  Currently i am only calling setInput when i know all of
the data will change.  Should i be calling setContents and rescheduling the
update job?

Since i don't really have a model anyway, it sort of sounds like i shouldn't be
using the deferred provider.  I could easily get away with using a regular
Viewer and adding items with an asyncExec.
Comment 4 Stefan Xenos CLA 2005-05-11 12:17:45 EDT
If you want to sort or filter a large table, DCP is perfect. setContents is
better than setInput. If you want some equivalent to setInput, you might try
using a SetModel and calling its set() method.
Comment 5 Boris Bokowski CLA 2009-11-26 09:55:10 EST
Hitesh is now responsible for watching bugs in the [Viewers] component area.
Comment 6 Eclipse Genie CLA 2020-06-21 16:32:23 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.