141

How do I get IntelliJ 10.5 (on the Mac) to generate a class diagram showing all of the classes in my project? I'm sure I'm overlooking something obvious, but I can only get the "Show Diagram" feature to show one class at a time. (I also figured out how to add additional classes, but again, only one at a time.)

Zack
  • 6,232
  • 8
  • 38
  • 68

7 Answers7

195

Use Diagrams | Show Diagram... from the context menu of a package. Invoking it on the project root will show module dependencies diagram.

If you need multiple packages, you can drag & drop them to the already opened diagram for the first package and press e to expand it.

Note: This feature is available in the Ultimate Edition, not the free Community Edition.

SwissCodeMen
  • 4,222
  • 8
  • 24
  • 34
CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
  • 4
    Does this mean there's no plugins available for community version to generate class diagram, now and in the future? – Bruce Sun Sep 20 '16 at 03:50
  • @BruceSun not at the moment – CrazyCoder Sep 21 '16 at 00:09
  • 5
    @CrazyCoder How do you use this to view a UML diagram for a class and it's edges, .. i am thinking find my nodes, dept 3 ... or all ... right now its pretty useless. it only shows class hiearchies, not what object it uses, and what those object in turn uses. This uml plugin is not useful. – mjs Dec 21 '16 at 21:03
  • Link down :-( could you fix it please? – Pipo Aug 03 '18 at 17:10
  • Upvote for the 'Note' part. – gfytd Feb 25 '23 at 03:05
74

IntelliJ IDEA 14+

  • Show diagram popup

    Right click on a type/class/package > Diagrams > Show Diagram Popup...
    or Ctrl+Alt+U

  • Show diagram (opens a new tab)

    Right click on a type/class/package > Diagrams > Show Diagram...
    or Ctrl+Alt+Shift+U

    right click Diagrams Show Diagram

By default, you see only the classes/interfaces names. If you want to see more details, go to File > Settings... > Tools > Diagrams and check what you want (E.g.: Fields, Methods, etc.)


P.S.: You need IntelliJ IDEA Ultimate, because this feature is not supported in Community Edition. If you go to File > Settings... > Plugins, you can see that there is not UML Support plugin in Community Edition.

Honza Zidek
  • 9,204
  • 4
  • 72
  • 118
ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
  • 3
    Hi guys, I am using Intellij 15.0.2 and I want to view class diagram of my project, however I can not see the selection Diagrams/Show Diagram when I right click in a package or a class. Can anyone help me? – Ectoras Jan 13 '16 at 16:02
  • 4
    @Ectoras , I suppose that you use Community Edition, not Ultimate. It is not available for Community Edition (see the P.S.: added in the post). I tested it in IntelliJ IDEA 15.0.2 Ultimate and it worked. – ROMANIA_engineer Jan 13 '16 at 23:39
63

You can install one of the free pugins - Code Iris. enter image description here


PlantUML

enter image description here

Other tools of this type in the IntelliJ IDEA are paid.


I chose a more powerful alternative:
In Netbeans - easyUML
In Eclipse - ObjectAid, Papyrus, Eclipse Modeling Tools

enter image description here


I hope it will help you.

Kas Elvirov
  • 7,394
  • 4
  • 40
  • 62
17

Try Ctrl+Alt+U

Also check if the UML plugin is activated (settings -> plugin, settings can be opened by Ctrl+Alt+S

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
6

Use Intellij plugin Sketch It!.

Class Diagram generated with Sketch It! plugin

Rohit Bansod
  • 181
  • 2
  • 2
  • 2
    ...which needs PlantUML plugin to visualize the diagram. With Community version 2019.1 it works, after installing Graphviz and adding `bin` to PATH. Windows 10. But, it only renders relationship in each package, not in the whole projects, thing that I expected, but thanks anyway. – WesternGun Oct 08 '19 at 14:04
  • sketch It is an amazing tool :》thanks – alen Apr 29 '22 at 05:43
2

Now there is an official way to add "PlantUML integration" plugin to your JetBrains product.

Installation steps please refer: https://stackoverflow.com/a/53387418/5320704

Zhi Yuan
  • 779
  • 1
  • 13
  • 20
0

this plugin is really good: Sketch It!.