9

So I've read the question How to show all parents and subclasses of a class in IntelliJ IDEA? but it doesn't solve my problem exactly.

I'm used to going to a method in eclipse, anywhere in the class hierarchy (jar or code), hitting Ctrl - T, it brings up a tree diagram of all classes above and below that implement that method (i.e if subclasses/superclasses don't implement this method it doesn't show them).

When you select a class from the diagram, it takes you precisely to that method.

Seems Ctrl - H shows you a general class diagram, not specific to the method you've selected. Ctrl - Shift - H, seems to show you a method hierarchy, but only the class and subclasses of the method you've selected (not the superclasses).

How do I navigate up the hierarchy to the specific method? Given that 1) I don't know at what level the method was defined at it's highest point. Also 2) given that there may be similar method names, so I don't want to rely on finding it by typing which may be error prone.

I regard this as pretty much bread and butter functionality, so I'd be disappointed if there isn't anything similar.

Update: The best I've found is hitting Ctrl - U a couple of times which eventually gets you to the top of the hierarchy, then hitting Ctrl - Shift - H naturally shows you everything below. This is more steps that eclipse and a little disorientating because the tool doesn't show you exactly where you were. Currently points still go to eclipse.

Community
  • 1
  • 1
Daniel Gerson
  • 2,159
  • 1
  • 19
  • 29
  • An excellent question. This Eclipse shortcut is a have to. Seems terrible that IntelliJ doesn't have that. The ctrl+U (super method option) doesn't work as you described in my case. Maybe it worked for old versions. Did you find a better trick ? – davidxxx Nov 25 '18 at 16:31
  • @davidxxx Sorry, been a while since I used IntelliJ and I don't have a better solution. – Daniel Gerson Feb 17 '20 at 20:24

2 Answers2

0

I would open a defect. There is no reason to filter the superclasses in the Hierarchy Method tab.

Vic
  • 21,473
  • 11
  • 76
  • 97
  • Arghhh. Thanx for acknowledging I've looked in all the right places. I really like what I was seeing in IDEA. Just goes to show that although IDEA may indeed have the edge... we're still in muchness of a muchness land with IDEs. Now to create a login to ANOTHER issue tracker... arghhh... – Daniel Gerson Jul 20 '13 at 21:40
  • 2
    I have opened an issue. Probably bad form to just copy and paste a link, but honestly I can't believe I even got that far. http://youtrack.jetbrains.com/issue/IDEA-110828 – Daniel Gerson Jul 20 '13 at 21:43
-1

To get the same behaviour in Intellij change the Implementation(s) keymaping:

Preferences > Keymap

Search for 'Implementation(s)'

Change the keymap to Ctrl+T

Chris Ritchie
  • 4,749
  • 2
  • 36
  • 33
  • @DanielGerson Yep, your right I did miss read the question. Not uncommon given the long hours we developers typically work. Not sure why you are so eager to dish out -1's though. A comment would suffice. – Chris Ritchie Sep 06 '16 at 10:29
  • -1 was given for the usefulness of the answer, not an evaluation of the answerer. I tried to remove it given that you took some offence (none should be taken), but Stackoverflow wouldn't let me, unless the answer is altered. – Daniel Gerson Sep 13 '16 at 19:17