Community
Participate
Working Groups
Add key binding to toggle through the different hierarchy views (Type, Supertype, Subtype) by pressing Ctrl+T again. Another feature from JDT that was missing in the CDT.
Created attachment 179044 [details] proposed patch
I tried the patch, works great!
Great patch! I have an additional request: When changing between the different kinds of hierarchies it is unclear which version is shown. This is especially the case when there are no sub-types or super-types. To make that clearer we should change the title of the control to something like: Type Hierarchy of '...' Subtype Hierarchy of '...' Sypertype Hierarchy of '...' Declarations of '...' in Type Hierarchy of '...' Declarations of '...' in Subtype Hierarchy of '...' Declarations of '...' in Supertype Hierarchy of '...'
Fixed in 8.0 > 20100928.
Sorry, wrong bug.
Thinking about your improvement I'm a little concerned if the string actually fits in, especially when the name of the type name is rather longish. I guess if there is no sub-type or super-type users will just keep on pressing the key-combination and give up as soon they recognize it's somehow useless asking for something that doesn't exist. Personally I don't read any long message provided by an UI because I'm kind of lazy. Guess that's typical for a fair amount of programmers. Another idea would be to offer the switch of hierarchy kind only if there is something "useful" to show. If there's nothing we wouldn't offer the keys at all. Any pointer on how to do that? I'm not that familiar with CDT's internals. That idea could lead to bug reports because the usage is somehow not deterministic (at least not obviously to some users). Good improvement request anyway, good chance to surpass JDT ;-) Could we (actually you) put it in cvs "as is" and open a new bug for that specific concern. I'm pleased to work on the new one if desired.
(In reply to comment #6) > Thinking about your improvement I'm a little concerned if the string actually > fits in, especially when the name of the type name is rather longish. "Type|Subtype|Supertype Hierarchy of '...'", will be ok (just 5 characters longer than today) For the other mode we can shorten the text to: "'...' in Type|Subtype|Supertype Hierarchy of '...'", which is (typically) just a bit longer than the current "Types defining or implementing '...'" > I guess > if there is no sub-type or super-type users will just keep on pressing the > key-combination and give up as soon they recognize it's somehow useless asking > for something that doesn't exist. > Personally I don't read any long message provided by an UI because I'm kind of > lazy. Guess that's typical for a fair amount of programmers. It's ok if you and many others do not read the message, we should still put it there. > Another idea would be to offer the switch of hierarchy kind only if there is > something "useful" to show. If there's nothing we wouldn't offer the keys at > all. Any pointer on how to do that? I'm not that familiar with CDT's internals. > That idea could lead to bug reports because the usage is somehow not > deterministic (at least not obviously to some users). I would not do that for exactly the reason you give. > Good improvement request anyway, good chance to surpass JDT ;-) > Could we (actually you) put it in cvs "as is" and open a new bug for that > specific concern. I'm pleased to work on the new one if desired. There is no hurry, let's straighten out the new feature first.
Created attachment 179862 [details] proposal with changing title Here is a proposal that updates the title with: Type hierarchy of '...', Subtypes of '...', Supertypes of '...'; Types declaring '...', Subtypes declaring '...', Supertypes declaring '...'; The titles are reasonably short, what do you think?
I like it. It's kind of perfect! Very nice to have those texts as short as possible. I think you came up with a very nice solution. I'm glad that you improved my proposal. Doing cdt hacking in my spare time imposes kind of limited resources that I can put in by myself. Good to have one todo less on my list. Thanks for taking care of it.
Just one small nit-pick. There's a dot after "Subtypes declaring '...'." ^ We might want to remove it.
(In reply to comment #10) > Just one small nit-pick. > There's a dot after "Subtypes declaring '...'." > ^ > We might want to remove it. Good catch, I removed it. Implemented in 8.0 > 20100930.
*** cdt cvs genie on behalf of mschorn *** Bug 325488: Toggle through quick type hierarchies, by Patrick Hofer. [*] THInformationControl.java 1.7 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/typehierarchy/THInformationControl.java?root=Tools_Project&r1=1.6&r2=1.7 [*] messages.properties 1.13 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/typehierarchy/messages.properties?root=Tools_Project&r1=1.12&r2=1.13 [*] Messages.java 1.11 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/typehierarchy/Messages.java?root=Tools_Project&r1=1.10&r2=1.11 [*] AbstractInformationControl.java 1.13 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/AbstractInformationControl.java?root=Tools_Project&r1=1.12&r2=1.13