I have parent class Parent with method getToken()
. And I have its child class - ChildA
and ChildB
, which don't override method getToken()
.
How I can search usages of method getToken()
which used by instance of class ChildA
?
Sorry for my English. Thanks!
As I spent half an hour to find the exact solution through all complicated and outdated documentations and examples, I just put the full answer using SSR here (Intellij 15.0.5):
Open SSR dialog (Edit > Find > Search Structurally...) and input template in screenshot, then click on "Edit variables..." to see the second dialog and edit the "Expression type (regexp)" as shown:
and if you want to include subclasses of ChildA too, just check the box "Apply constraint within type hierarchy" bellow the expression type:
You can add getToken()
to ChildA
, perform the search only for this method, then delete it. Another way is to use Structural Search and Replace.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With