Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 106550

Summary: [Viewers] CheckboxTreeViewer's setSubtreeChecked() doesn't work well with deferred content
Product: [Eclipse Project] Platform Reporter: Curtis d'Entremont <curtispd>
Component: UIAssignee: Boris Bokowski <bokowski>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P5 CC: Tod_Creasey
Version: 3.0.2Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Curtis d'Entremont CLA 2005-08-09 16:04:01 EDT
I have a CheckboxTreeViewer, and there are some long running operations over a
network to provide the content, so I use a DeferredTreeContentManager to fetch
the children, and put a "Pending..." node while it's fetching. So far so good.

I wanted to make it so that checking one item checks all the children
automatically so i tried using setSubtreeChecked(), which is exactly what I was
looking for, and it seems to work, but it causes problems:

1) If I haven't fully expanded my tree yet and I do it, it prevents me from
expanding the tree afterwards past what it was already expanded.
2) There's some flickering with the [+] sign appearing for a short time on the
leaf nodes in the tree.

It appears that it's trying to get all the child items in the tree so that it
can set them as checked, but with deferred content it is seeing the pending item
and stopping there, thinking that's the end of it, while in fact it's not. I am
not sure why it's preventing me from expanding though.

This is not a huge problem because this is just a convenience method - I can
provide my own implementation that works with deferred content.
Comment 1 Tod Creasey CLA 2007-10-10 10:29:09 EDT

*** This bug has been marked as a duplicate of bug 205923 ***