CallGraph helps you understand your Java codebase by visualizing how methods call each other. Simply select any method, generate a graph, and explore the connections through an interactive diagram. When you click on edges in the graph, you'll be taken directly to where that method call appears in your code editor.
- Place your caret (text cursor) on any Java method in your code
- Either:
- Right-click and select "Generate Call Graph" from the context menu
- Use keyboard shortcut Alt+Shift+E (Option+Shift+E on macOS)
- Click on the CallGraph icon in the toolbar (or use View → Tool Windows → CallGraph) and click the GENERATE button
- Click on any node (method) in the graph to jump to its definition
- Click on any edge (arrow) in the graph to jump to the exact line where that method is being called
- You can generate call graphs for any method in your codebase
- You can generate graphs directly from the editor context menu (right-click) or using Alt+Shift+E (Option+Shift+E on macOS) shortcut
- You can navigate to method definitions by clicking nodes in the graph
- You can navigate to exact method call locations by clicking edges in the graph
- You can pan & zoom in and out of the graph
- You can save the graph as a HTML file
- You can customize graph appearance with options like background color
- IntelliJ IDEA (Community or Ultimate) 2022.1 or later
- Java 8 or higher
- Java projects only (requires the Java module)
You can install CallGraph in several ways:
- Click the button above
- Download the latest release from the Releases page
- Open IntelliJ IDEA
- Go to Settings (Preferences) → Plugins
- Click the gear icon and select "Install Plugin from Disk..."
- Select the downloaded ZIP file
- Restart IntelliJ IDEA when prompted
The plugin consists of two main components:
- Analyzes Java code to extract method call relationships
- Uses IntelliJ Platform APIs to track editor activity and method references
- Processes the call hierarchy data and exposes it to the frontend
- Built with vis-network.js for interactive graph visualizations
- Provides a responsive UI for graph navigation and exploration
- Communicates with the Java backend through a JavaScript bridge
For development, you'll need:
- JDK 17+
- Node.js v18.10.0 (or later) and npm
- IntelliJ IDEA
Quick Start: The easiest way to run the project is to open it in IntelliJ IDEA and run the "Run Plugin" configuration.
- Clone this repository
- Open the project in IntelliJ IDEA
- Use Gradle to build the plugin:
./gradlew buildPlugin - The plugin ZIP file will be generated in
build/distributions/
The frontend uses webpack to bundle JavaScript and HTML files.
-
Navigate to the frontend directory:
cd src/main/frontend -
Install dependencies:
npm install -
Build the frontend assets:
npx webpack
This will generate the bundled files in src/main/resources/build/, which are then included in the plugin.
Contributions are welcome! If you'd like to contribute, please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
- Added Kotlin support: generate call graphs for Kotlin methods and functions
- Added cross-language support: Java calling Kotlin and Kotlin calling Java are both tracked
- Added configurable limits to prevent hangs on large codebases: Max Callers Per Node (default 10) and Max Total Nodes (default 150)
- Truncated nodes keep a "+ more callers" button so additional callers can be loaded in batches
- Improved satellite node appearance: pill-shaped buttons with hover highlight and tooltips
- Increased default Max Depth from 5 to 8
- Major frontend overhaul: migrated to React with interactive physics-based graph
- Added lazy expansion mode: click nodes to expand the call graph incrementally
- Added Leva settings panel for runtime configuration
- Improved lazy mode physics: velocity kick for new nodes, pinning existing nodes on expansion
- Lazy mode disables Max Depth setting (not applicable)
- Fixed root node pinning in lazy mode
- Fixed callee filter to exclude JDK and library methods
- Added regeneration warning when settings change
- Graph export filename now includes direction (callers/callees)
- Added node hiding functionality — click on a node to see the "Hide Node" button
- Added "Show All" button to restore all hidden nodes
- Added proper handling for IDE indexing state (fixed IndexNotReadyException)
- Added options menu for customizing graph background color
- Fixed crash when opening new projects with CallGraph window open
- Fixed multi-project support to respect active editor context
- Added right-click context menu option to generate call graphs
- Added keyboard shortcut (Alt+Shift+E, Option+Shift+E on macOS) for quick graph generation
- Improved plugin description for better clarity
- Initial release
- Interactive call graph visualization
- Support for Java projects
- Spring controller endpoint detection
This project is licensed under LICENSE - see the LICENSE file for details.
