Opening the Dependency Matrix

Opening the Dependency Matrix for your project

You can open the Dependency Matrix from the main menu by going to Code | Analyze Code | Dependency Matrix.

Open Dependency Matrix from the menu

Alternatively, use Find Action ⌘⇧A (macOS) / Ctrl+Shift+A (Windows/Linux) and search for “matrix”.

Open Dependency Matrix using Find Action

To use this feature, the Dependency Matrix plugin needs to be enabled.

Dependency Matrix plugin

When opening the Dependency Matrix, specify the scope you want to analyze. You can select the Whole project or specify a Custom scope, and whether to include test sources or not.

Dependency Matrix scope

After defining the scope, click Analyze.

If the project’s class files are out of date, the analysis may result in incomplete or incorrect data. To avoid this, IntelliJ IDEA will prompt you to compile the project before continuing the DSM analysis. Click Yes to build the project and make sure everything is up-to-date.

Dependency Matrix - Project is out of date

The DSM tool window will open in a popup, showing a matrix of your project’s components.