Jetbrains Marketplace: https://plugins.jetbrains.com/plugin/27772-code-trace
Intellij Code Trace is an IntelliJ IDEA plugin that analyzes your project’s source code and extracts method-to-method call relationships.
It helps developers and architects better understand the structure and dependencies within their codebase.
(📝Note: Execution time may vary based on the number of selected files and the complexity of the project. Larger selections or more complex codebases may result in longer processing times.)
Automatically detects and maps which methods call which, across your entire project.
Easily export analyzed data for further processing in Excel, scripts, or custom analysis tools.
Generate Cypher queries to import method relationships into a Neo4j graph database for rich visual analysis and graph-based querying.
In the Project View, select the folder or file you want to analyze, right-click, and choose "Export Code Trace". Then, select your preferred output format.
Under Settings > Tools > Code Trace, users can configure which data fields to include in the export, as well as define the output file name.
The plugin supports exporting method relationships in two formats: CSV and Cypher.
The CSV file contains information about caller and callee methods, making it easy to analyze dependencies in spreadsheet applications or custom scripts.
- Example:
caller_short_name,caller_full_name,callee_short_name,callee_full_name "MethodUtils.getFullName","com.pino.intellijcodetrace.utils.MethodUtils.getFullName(Method)","Method.getClassQualifiedName","com.pino.intellijcodetrace.model.Method.getClassQualifiedName()" "MethodUtils.getShortName","com.pino.intellijcodetrace.utils.MethodUtils.getShortName(Method)","Method.getClassName","com.pino.intellijcodetrace.model.Method.getClassName()"
The Cypher output includes syntax to create relationships in Neo4j.
- Example:
MERGE (a:method {short_name: "MethodUtils.getFullName", full_name: "com.pino.intellijcodetrace.utils.MethodUtils.getFullName(Method)"}) MERGE (b:method {short_name: "Method.getClassQualifiedName", full_name: "com.pino.intellijcodetrace.model.Method.getClassQualifiedName()"}) MERGE (a)-[:call_method]->(b); MERGE (a:method {short_name: "MethodUtils.getShortName", full_name: "com.pino.intellijcodetrace.utils.MethodUtils.getShortName(Method)"}) MERGE (b:method {short_name: "Method.getClassName", full_name: "com.pino.intellijcodetrace.model.Method.getClassName()"}) MERGE (a)-[:call_method]->(b);
After importing into Neo4j, the method call relationships will appear as shown below:

