IntelliJ IDEA find method overrides
Asked Answered
B

3

23

Assuming I have method init() in some MyBaseClass.

Is there a way to quickly find overrides of this method in subclasses?

Sure, I can find throughout a project @Override void init, but maybe there is a smarter way?

Brelje answered 29/6, 2017 at 9:7 Comment(3)
Navigate | Implementations?Spectroscope
Yeah, that's it! Thanks, did not think about looking there ) Please post it as an answer, so I could accept it.Brelje
Additional tip: To view the overrides in the Find tab you can click the pin icon in the popover dialog (assuming there are multiple overrides).Anallise
S
27

Please use Navigate | Implementations.

Spectroscope answered 29/6, 2017 at 9:23 Comment(2)
ctrl-t for shortCondolence
Option-Command-B on MacErleneerlewine
S
1

Alternatively you can display the method hierarchy by selecting the method and then "Navigate -> Method hierarchy" (Ctrl+Shift+H).

(Pay attention to the symbol footnote: "(+) method is defined in this class", "(-) method is not defined in the class" and "(!) method must be defined since the class is not abstract")

Swacked answered 19/5, 2023 at 17:7 Comment(1)
This should be the accepted answer because it concisely answers the question to the point, instead of providing a link to a document in which I need to find a needle in a haystack. The Ctrl+Shift+H is priceless. The "Pay attention to the symbol footnote: (+/-)" is even more priceless. :)Slap
U
0

To only see overridden methods, highlight the superclass method, then press ctrl+alt+b.

Uncanny answered 31/10, 2023 at 12:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.