Bug 58848 - [Viewers] CheckBoxTreeViewer class should not create the roots' children tha tare not visible
Summary: [Viewers] CheckBoxTreeViewer class should not create the roots' children tha ...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P4 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 340488 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-16 11:13 EDT by Ines Khelifi CLA
Modified: 2017-07-06 04:28 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ines Khelifi CLA 2004-04-16 11:13:36 EDT
After investigating Bug# 50963, I came across the CheckBoxTreeViewer class. I 
noticed that when tree items need to be checked, the checking methods in that 
class create the tree items that have not been created (through 
an "internalExpand" method), even if their parents have not been expanded yet.

It would be more efficient to store their checked state, and check the items 
as they become visible.

I am using M8.
Comment 1 Ines Khelifi CLA 2004-04-16 11:14:45 EDT
Excuse my spelling!! Here is the title again! Correctly spelled.

"[Viewers] CheckBoxTreeViewer class should not create the roots' children that 
are not visible"
Comment 2 Tod Creasey CLA 2004-04-19 12:31:37 EDT
We will investigate in 3.1.
Comment 3 Tod Creasey CLA 2004-06-28 11:28:03 EDT
Reopening now that 3.0 has shipped
Comment 4 Andreas Hauser CLA 2009-02-02 11:30:18 EST
Seems to me that CheckboxTreeViewer still does not completely support lazy/VIRTUAL.
Comment 5 Boris Bokowski CLA 2009-02-02 12:25:40 EST
(In reply to comment #4)
> Seems to me that CheckboxTreeViewer still does not completely support
> lazy/VIRTUAL.

Yes. It could be made to work using ICheckStateProvider (new API in 3.5).

See also http://wiki.eclipse.org/Platform_UI/How_to_Contribute
Comment 6 Boris Bokowski CLA 2009-11-26 09:53:19 EST
Hitesh is now responsible for watching bugs in the [Viewers] component area.
Comment 7 Guido Schnepp CLA 2017-07-06 02:29:50 EDT
Just tried this with Eclipse Oxygen 4.7 on 2017-07-06: This problem still exists today. :-( Luckily the solution mentioned in the other bug 340488 report works for me, too.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=340488

How is that possible that two bugs with same message remain open for 13 resp. 6 years? No one is responsible for them?
Comment 8 Andrey Loskutov CLA 2017-07-06 02:46:10 EDT
*** Bug 340488 has been marked as a duplicate of this bug. ***
Comment 9 Andrey Loskutov CLA 2017-07-06 02:48:48 EDT
(In reply to Guido Schnepp from comment #7)
> 
> How is that possible that two bugs with same message remain open for 13
> resp. 6 years? No one is responsible for them?

If this problem that important for you, please consider to contribute a fix,
https://wiki.eclipse.org/Platform_UI/How_to_Contribute
Comment 10 Guido Schnepp CLA 2017-07-06 03:59:23 EDT
I'm sorry, I was able to commit a javadoc update only. Since its the first time I'm trying to contribute here I hope it makes it thru the chain.

While I was able to track down the problem to a recursion in standard implementation of CheckboxTreeViewer.preservingSelection(...) I don't understand the problem in detail actually. Why is this recursion necessary?

It's on you, the masters of Eclipse code, now. Many thanks in advance!
Comment 11 Guido Schnepp CLA 2017-07-06 04:28:54 EDT
To help analyzing this: Just exchange the standard TreeViewer in Snippet047VirtualLazyTreeViewer.java by a CheckboxTreeViewer and you'll be hit by the problem - until you've added your own ICheckStateProvider like mentioned in bug 340488!