| Summary: | [IDE] Cannot create a virtual TreeViewer in ContentOutlinePage | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Jan Koehnlein <jan> | ||||
| Component: | UI | Assignee: | Paul Webster <pwebster> | ||||
| Status: | VERIFIED FIXED | QA Contact: | Paul Webster <pwebster> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | bokowski, remy.suen | ||||
| Version: | 3.6.1 | ||||||
| Target Milestone: | 3.7 M5 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 186208 [details]
add getTreeStyle() to page
Could override and return different styles as necessary.
Jan, could you please test and see that making it a virtual tree doesn't mean any other changes?
PW
Thanks for the patch. It looks fine. I don't see any more obstacles making an outline tree virtual apart from the general performance issue in #266189. (In reply to comment #1) > Created attachment 186208 [details] > add getTreeStyle() to page This patch makes sense to me, +1. Please update the copyright header to 2011 while you're at it and maybe put a note in the class-level javadoc about the new method for configuring the tree viewer's construction. Updated the javadoc and released to HEAD PW new API in I20110124-1800 PW |
org.eclipse.ui.views.contentoutline.ContentOutlinePage has a private field TreeViewer treeViewer, that is initialized in the createControl method. If you want to use a virtual tree viewer, you cannot do that by subclassing as it requires an additonal flag in the constructor call. As a consequence, you have to double all the code in your implementation. Possible solutions - provide a protected setTreeViewer() method - extract the initialization flags into a protected method protected int getFlags() { return SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL; }