Eclipse JDT has a 'call hierarchy' feature -- start from a field/method and it recursively finds all references.
IntelliJ also implements this, but it only works from methods. For fields, you can only 'Find Usages', so if you want to dig deeper you have to do additional searches.
Tried 'Dataflow to here', but it's not what I'm looking for.
Am I missing something? Is there a better way to explore field usage in IntelliJ?
To open the Call Stack windowSelect the menu item View | Call Stack.
In the Java perspective, Call Hierarchy view shows callers and callees for the selected Java member. In the JavaScript perspective, Call Hierarchy view shows callers and callees for the selected JS member. Both Java and JavaScript perspectives (as well as their views) are the part of the Eclipse-based IDE.
By default, IntelliJ IDEA shows all classes, methods, and other elements of the current file. To toggle the elements you want to show, click the corresponding buttons on the Structure tool window toolbar. to show class fields. to have protected class members shown in the tree.
Select the method you're interested in and then use from the top menu "Navigate > Call Hierarchy" or simply Ctrl+Alt+H.
AFAIK this doesn't work for fields, because when I select a field, the "Navigate > Call Hierarchy" option becomes grayed-out. The only similar featutes I'm aware of for fields are "Edit > Find > Find Usages" (Alt+F7) and "Edit > Find > Show Usages" (Ctrl+Alt+F7).
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