CodeExplorer frequently asked questions
A. The plugin analyses Java code (finds all method call chains to the method, or from it within class, and other) and
shows results on diagram:
the nodes represent methods, the edges are calls or usages between methods.
A. Understanding method call chains within a class (package, module or project) helps to refactor your Java code,
remove duplicated and dead code, reuse existing code.
If you know all call chains to some method then you will be able to test all its usages from UI, refactor it safely
and find out under which conditions method is called (thread, parameters).
A. Execute plugin commands from Analyze menu, and plugin will show analysis results on diagram.
You can add more nodes to the opened diagram by double-clicking on diagram nodes or
executing commands from the context menu for a diagram node.
A. Double-click on diagram node to show method call from it or its usages,
or select a node and execute a command from Analyze or diagram node context menu
- Method analysis: call chains to the method and method structure (all call chains from the method within class)
- Unit analysis: all methods in selected unit (Java class, package, module or project) and all calls between them
A. Select a Java method in the editor and call from Analyze
- Method structure (all method call chains from it within class)
- Method call chains to this... (all method call chains to this method within current class, package, module or project)
- Method call chains to this from... (all method call chains to this method from selected class, package or module)
A. Select class, package or module in the Project view or Java class in the editor,
and call "Methods and calls in..." from Analyze menu.
If execute Analyze menu command for method selected in the editor or class, package, module from the Project view then
diagram with analysis results is opened in a new tab.
Commands executed for diagram nodes add more nodes to the current diagram.
You can close current tab using the Close tab toolbar button.
It depends on the Show on doubleclick
combobox (diagram toolbar) value:
- "calls": calls from the method
- "usages": usages of the method
The plugin starts with the "calls" combobox value so to add method usages by double-click
you should choose "usages" in the combobox before clicking on nodes.
You can switch between "calls" and "usages" when you need.
A. The question icon in method node indicates that double-click on the node will add more nodes to the diagram.
The method icon in method node indicates that double-click won't add new nodes or
all calls from the method or its usages (depending on the Show on doubleclick combobox value) are added already to the diagram.
A. You can setup filters in the CodeExplorer settings.
CodeExplorer doesn't analyse method and doesn't show it on the diagram if there is a filter for this method.
There are several filter types: library (method is outside project sources), method name (by prefix) and
scope (method belongs to specified class, package or module).
A. A sequence diagram is a possible graph layout but this layout is good for diagrams that contain a few methods and single method call chain.
But the analysis results can contain many start methods and call chains, even the method calls graph can be non-planar.
So the plugin uses tree graph layout with layering by call depth.
A. Select a method node and press F4, or execute Jump to source command from the method node context menu.
A. Yes. Use diagram Open, Save toolbar buttons.
- Node tooltip contains method signature and body, and useful hint (when you pause a mouse pointer over a method node)
- Switch to short (camelwords) class names to save diagram space (show class names button in the diagram toolbar)
- You can hide method body in the node tooltip (show method body in tooltip button in the diagram toolbar)
A. You can download plugin here
A. No. The plugin requires Idea 8.
- Open Settings > Plugins
- Find the CodeExplorer in the available plugins list, right click on it and choose install