How can I search for all method calls to a specified interface or class?

Right now, I need to find all references to the interface or class, and then find all references to those, to see the method calls.
Can it be done in one command like using Structural Search?

Comment actions Permalink

There is "Call Hierarchy" action (on the main menu "Navigate | Call Hierarchy") for method calls.

Comment actions Permalink

An answer using Structural Search (or as I like to call it "Find Usages on Steroids").
To find all calls to methods of a specific class in Java code you can use a query like the following:


with the variable defined as follows:


minimum count: 0
maximum count: 1
Text/regexp for java expression type: name of the class or interface e.g. java\.lang\.String


minimum count: 0
maximum count: unlimited


you might want to fill in Text/regexp to restrict the search to a specific method or methods.

Please sign in to leave a comment.