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

Bug 325623

Summary: [Quick type hierarchy] Hide non implementing classes
Product: [Tools] CDT Reporter: Marc-André Laperle <malaperle>
Component: cdt-source-navAssignee: Markus Schorn <mschorn.eclipse>
Status: RESOLVED FIXED QA Contact: Markus Schorn <mschorn.eclipse>
Severity: enhancement    
Priority: P3    
Version: 8.0   
Target Milestone: 8.0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Hide non implememting classes
none
Test project
none
Hide non implememting classes
none
Hide non-implementing leave nodes mschorn.eclipse: iplog-

Description Marc-André Laperle CLA 2010-09-17 12:35:16 EDT
When using quick type hierarchy on big hierarchies that only have some classes implementing/overriding the method of interest, it will display a lot of "grey" nodes of non implementing classes making it tedious to navigate. I suggest adding an option to hide the branches that do not contain any implementing classes.

Small example:

Class1
   Class2 (green)
   Class3 (grey, hide it)
      Class4 (grey, hide it)
   Class5 (grey, hide it)
   Class6 (grey, don't hide it because of Class7)
      Class7 (green)
Comment 1 Marc-André Laperle CLA 2010-09-25 17:45:23 EDT
Created attachment 179577 [details]
Hide non implememting classes

This patch removes the nodes of non implementing classes. I'm not sure it's worth it to add an option for this. Any opinion?
Comment 2 Marc-André Laperle CLA 2010-09-25 17:47:55 EDT
Created attachment 179578 [details]
Test project
Comment 3 Marc-André Laperle CLA 2010-09-25 17:52:20 EDT
Created attachment 179579 [details]
Hide non implememting classes
Comment 4 Markus Schorn CLA 2010-09-28 04:41:26 EDT
(In reply to comment #1)
> Created an attachment (id=179577) [details]
> Hide non implememting classes
> This patch removes the nodes of non implementing classes. I'm not sure it's
> worth it to add an option for this. Any opinion?

I don't think we need the option.
Comment 5 Markus Schorn CLA 2010-09-28 05:00:10 EDT
Created attachment 179721 [details]
Hide non-implementing leave nodes

I have replaced your patch for the following reasons:
* Your patch is incomplete (misses some change to THNode). 
* The model is used for both the type-hierarchy view and the quick type hierarchy. In the view, the non-implementors must not be removed. 
* I think the non-implementing leaves should be shown in the super-type hierarchy, which will be availabe with the implementation of bug 325488.
Comment 6 Markus Schorn CLA 2010-09-28 05:17:42 EDT
Fixed in 8.0 > 20100928.
Comment 8 Marc-André Laperle CLA 2010-09-29 00:09:21 EDT
Thanks a lot Markus!