| Summary: | [Dialogs] increase visibility of FilteredTree members | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Damian Biollo <damian_biollo> |
| Component: | UI | Assignee: | Susan McCourt <susan> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | bokowski |
| Version: | 3.3 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
cc'ing Boris. Boris, it looks like there are some loose ends related to bug #152170 that still prevent successful reuse of FilteredTree. Do you have any problems with the suggestion to make these fields protected? seems worth doing since we've already taken a step in that direction. (In reply to comment #0) > For example, if I want to override createTreeControl (which is declared > protected), the following code becomes very problemic because of the scope of > refreshJob -- basically it means that I can't safely override > createTreeControl: As per the Javadoc comment on createTreeControl(), you are supposed to override doCreateTreeViewer() instead. Does this not work? It sounds like the code in Eclipse 3.3 with the doCreateTreeViewer will work. Thanks for the info and the link to 152170. I'm on 3.2 right now and can wait for the next released version. Thanks |
I'm using the FilteredTree to add filtering to a docking view. I need to override the class to provide a few customizations, such as a subclassed TreeViewer. This is almost totally possible, with the exception that 2 members are declared private instead of protected: private PatternFilter patternFilter; private Job refreshJob; For example, if I want to override createTreeControl (which is declared protected), the following code becomes very problemic because of the scope of refreshJob -- basically it means that I can't safely override createTreeControl: treeViewer.getControl().addDisposeListener(new DisposeListener(){ public void widgetDisposed(DisposeEvent e) { refreshJob.cancel(); } }); A protected accessor function for refreshJob and patternFilter would also suffice to solve this.