Explain Codes LogoExplain Codes Logo

Use IntelliJ to generate a class diagram

java
ide
plugins
uml
Anton ShumikhinbyAnton Shumikhin·Mar 9, 2025
TLDR

To generate a class diagram swiftly in IntelliJ IDEA Ultimate:

  1. Right-click on the desired class or package in the Project Explorer.
  2. Click on Diagrams > Show Diagram (Ctrl+Alt+U).
  3. Select Java Class Diagrams from the options.

You can further modify your diagram via the right-click context menu and export it using Export to File on the top toolbar.

// Because who reads the menu anyway? // Right-click on class > Diagrams > Show Diagram

Perks of Ultimate Edition

In the empowered Ultimate Edition of the IDE:

  • You can view all project classes at once with Show Diagram...>All Classes.
  • Expand your class or package diagrams hassle-free using the 'e' key.
  • Customize every detail of your diagrams at File > Settings > Tools > Diagrams.

Heads Up: These advanced class diagram features are exclusive to the Ultimate Edition and won't be available in the Community Edition.

Pump up IntelliJ with plugins

Boost IntelliJ's diagram abilities with Code Iris for a quicker overview of your project's architecture. You can PlantUML for code-friendly diagram generation.

For NetBeans enthusiasts, easyUML fills this void. If you're an Eclipse user, you have several options like ObjectAid UML Explorer, Papyrus, or the Eclipse Modeling Tools.

Mac users with IntelliJ IDEA 10.5

If you’re sailing on this ship, check the compatibility of diagram plugins with your specific version before diving in.

Alternatives when Ultimate is beyond reach

Don't have access to the Ultimate Edition? No problem! The JetBrains plugin repository has Sketch It!, perfect for simpler navigation needs.

Common roadblocks

If you encounter issues like plugin installation errors or incorrect associations on diagrams, double-check that UML plugins are activated. It's tucked under settings (shortcut: Ctrl+Alt+S/U).