I built this IntelliJ IDEA plugin because understanding how different methods connect in complex codebases can be challenging sometimes.
I found myself wishing for a visual way to trace these relationships. So I created CallGraph to solve that problem.
$What does CallGraph do?
CallGraph shows you how methods in your Java (and Kotlin, including mixed projects) code call each other. Place your cursor on any method, hit generate, and you get an interactive graph of every caller and its relationships.
- visualizeinteractive graph of method call relationships
- navigateclick any node or edge to jump straight to the source
- explorepan and zoom through larger graphs without losing context
- exportsave the graph as a standalone HTML file
$How to use it
- 01Right-click on a method and choose Generate Call Graph.
- 02Or open the CallGraph tool window (View → Tool Windows → CallGraph), place your caret on a method, and hit GENERATE.
- 03Or use the keyboard shortcut Alt+Shift+E (Option+Shift+E on macOS).
- 04Click nodes to jump to their definitions, click edges to see exactly where the call happens. Pan and zoom through larger graphs. Save as HTML to keep it.
>>Under the hood
The plugin has two main parts.
Backend (Java)
- static analysiswalks Java / Kotlin source to extract method call relationships
- platform APIsuses IntelliJ Platform APIs to track editor activity and method references
- pipeprocesses call hierarchy data and hands it to the frontend
Frontend (JavaScript)
- vis-network.jsvis-network handles the interactive graph rendering and layout
- uinavigation, selection, and exploration live here
- bridgetalks to the Java backend through a JS bridge
>>Give it a try
Visualize caller–callee relationships for any Java or Kotlin method. Jump straight to definitions or call sites.
IntelliJ IDEA plugin that creates a callers graph for selected methods. Issues and PRs welcome.