| Summary: | [Viewers] CheckboxTreeViewer doesnt support ILazyTreeContentProvider | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Prashant Deva <prashant.deva> |
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | eclipse.felipe, guido.schnepp, harapeti, loskutov, prakash, remy.suen |
| Version: | 3.6.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Prashant Deva
And what is even worse is that when changing the TreeViewer to CheckboxTreeViewer ([1]) in the sample code [2], it leads to a StackOverflowError. Here's a complete stack trace which shows that updateElement, updateChildCount, etc. methods are called until a StackOverflowError occurs: http://i.imgur.com/EPBoJeg.png If you complement the code with setting a custom check state provider for the CheckboxTreeViewer, it solves the problem: <code> <pre> v.setCheckStateProvider(new ICheckStateProvider() { /** * TODO: provide complete solution if checkboxes are really needed */ @Override public boolean isGrayed(Object element) { return false; } /** * TODO: provide complete solution if checkboxes are really needed */ @Override public boolean isChecked(Object element) { return false; } }); </pre> </code> [1]: http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fjface%2Fviewers%2FCheckboxTreeViewer.html [2]: https://github.com/vogella/eclipse.platform.ui/blob/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet047VirtualLazyTreeViewer.java#L132 Just tried this with Eclipse Oxygen 4.7 on 2017-07-06: This problem still exists today. :-( Luckily the solution works for me, too. Duplicate of bug 58848 from 2004. Still open. https://bugs.eclipse.org/bugs/show_bug.cgi?id=58848 https://wiki.eclipse.org/Platform_UI/How_to_Contribute *** This bug has been marked as a duplicate of bug 58848 *** |