Use IntelliJ to generate class diagram
Solution 1
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.
Solution 2
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
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.
Solution 3
You can install one of the free pugins - Code Iris.
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
I hope it will help you.
Solution 4
Try Ctrl+Alt+U
Also check if the UML plugin is activated (settings -> plugin, settings can be opened by Ctrl+Alt+S
Solution 5
Use Intellij plugin Sketch It!.
Zack
Updated on January 15, 2021Comments
-
Zack over 3 years
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.)
-
Ectoras over 8 yearsHi 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?
-
ROMANIA_engineer over 8 years@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.
-
Bruce Sun over 7 yearsDoes this mean there's no plugins available for community version to generate class diagram, now and in the future?
-
CrazyCoder over 7 years@BruceSun not at the moment
-
mjs over 7 years@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.
-
Pipo almost 6 yearsLink down :-( could you fix it please?
-
WesternGun over 4 years
Code Iris
just stops my project to launch. Community version 2019.1. -
WesternGun over 4 years...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. -
Kas Elvirov over 4 years@WesternGun i'm not surprised man. This tool with 3 stars rating...
-
subject-q almost 4 yearsI installed PlantUML plugin, but do not know how to get started and use it. Please add that also
-
Dwarakesh Pallagolla over 3 yearslooks like PlantUML is used to create class diagrams? I did not see any use case/instructions online where it can be used to generate class diagrams automatically.
-
alen about 2 yearssketch It is an amazing tool :》thanks