How to generate Class Diagram (UML) on Android Studio (IntelliJ Idea)

I've try to search and found this link, but Ctrl + Alt + Shift + D doesn't work. I also use find Action Ctrl + Shift + A to find action about diagram and uml but found nothing. I also search for the uml plugin, but most of them didn't work with new version of intelliJ (I didn't try it I just read the comment).

asked Jun 15, 2013 at 11:56 11k 10 10 gold badges 73 73 silver badges 102 102 bronze badges

I noticed the UML Modeling feature only available in Ultimate Edition but not in Community Edition see jetbrains.com/idea/features

Commented Mar 14, 2014 at 7:27

10 Answers 10

I found a free plugin that can generate class diagrams with android studio. It's called SimpleUML.

Update Android Studio 2.2+: To install the plugin, follow steps in this answer: https://stackoverflow.com/a/36823007/1245894

Older version of Android Studio On Mac: go to Android Studio -> Preferences -> Plugins

On Windows: go to Android Studio -> File -> Settings -> Plugins

Click on Browse repositories. and search for SimpleUMLCE (CE means Community Edition, this is what android studio is based on).

Install it, restart, then you can do a right click on the folder containing the classes you want to visualize, and select Add to simpleUML Diagram .

That's it; you have you fancy class diagram generated from your code!

5,715 3 3 gold badges 18 18 silver badges 13 13 bronze badges answered Aug 24, 2015 at 21:14 11.7k 8 8 gold badges 43 43 silver badges 65 65 bronze badges I can't find SimpleUMLCE in the repositories, has it been removed? Commented Oct 25, 2015 at 19:36 And hasn't been updated in almost 6 years - looks dead. Commented Feb 1, 2016 at 4:11

I right clicked on the folder containing classes I wanted to visualize, selected Add to simpleUML Diagram . and an empty diagram appeared. Impressive.

Commented Apr 5, 2016 at 14:12 doesn't work anymore, should edit answer to provide solution for AS 2.x Commented Apr 25, 2016 at 10:20 SimpleUMLCE doesn't exist in repository browser. Commented Mar 27, 2017 at 14:43

For those who want to use simpleUML in Android Studio and having issues in running SimpleUML.

Now follow the below steps.

Step 1:

Click on File and go to Settings (File → Settings)

Step 2

Select Plugins from Left Panel and click Install plugin from disk


1]

Step 3:

Locate the SimpleUML jar file and select it.

2]

Step 4:

Now Restart Android Studio (File → Invalidate Caches/Restart → Just Restart)

Step 5:

After you restart Right Click the Package name and Select New Diagram or Add to simpleUML Diagram → New Diagram.

3

Step 6:

Set a file name and create UML file. I created with name NewDiagram

enter image description here

Step 7:

Now Right Click the Package name and Select the file you created. In my case it was NewDiagram

enter image description here

Step 8:

All files are stacked on top of one another. You can just drag and drop them and set a hierarchy.

enter image description here

Like this below, you can drag these classes

enter image description here

6,715 9 9 gold badges 55 55 silver badges 104 104 bronze badges answered Apr 24, 2016 at 12:19 farhangdon farhangdon 2,003 2 2 gold badges 21 21 silver badges 30 30 bronze badges is there some way of auto arranging 200++ stacked classes?! Commented Aug 5, 2016 at 9:46

Actually I just found it. There is grayed icon, second from the bottom in second column of icons, that does auto-layout and it is not disabled as it looks. "Toggle-Automatic-Layout".

Commented Aug 5, 2016 at 12:41

FYI I had to import twice (AS 2.3), the first time AS (Android Studio) didn't restart, it just closed (shut down). I gave it another try (ran through the import steps above) and everything worked.

Commented Apr 5, 2017 at 3:19

Ok, its working great but it omits long class members/methods names which makes it hard to guess their names. Is there any way to fix the 3-dots at the end of members/methods names?

Commented Dec 30, 2019 at 15:32

fyi: As of Android Studio Arctic Fox | 2020.3.1, I am unable to install the specified *.jar. There are unfortunately compatibility issues.

Commented Aug 9, 2021 at 17:25

I have managed to to do it in a way. Perform all the steps as referenced by Michal Rowicki above.

  1. Open Visual Paradigm software.
  2. Create a new Project
  3. There would be an option on the Tools bar above that states Code and select Instant Reverse. from the drop down menu with Java language(or other)
  4. Select your application folder where your project is located and add it to the project(i have selected the complete folder application)
  5. The application should now appear on the left pane in Class Repository
  6. Then all you do is right click the project that you have added and select Reverse to new class diagram
  7. Select either you wish to have the packages included in the class diagram or just the class diagram of the project

Then it should appear on your screen and customize it as you wish

However i do not know if the plugin in Android Studio was necessary nevertheless it has worked in a way for me.

16.3k 9 9 gold badges 109 109 silver badges 151 151 bronze badges answered Sep 8, 2014 at 15:02 261 3 3 silver badges 3 3 bronze badges Tried this without mentioned plugin and it is working. No need to install it. Commented Feb 25, 2015 at 16:21 After step 7 nothing happen Commented Jul 21, 2016 at 14:56

@Matteo you have to wait a little bit, the window with your class diagram should appear in a few seconds (maybe a minute) not directly, maybe it depends on how fast your computer is.

Commented Nov 14, 2020 at 1:51
  1. type Ctrl + Alt + S (or go to Preferences)
  2. go to the Plugins tab, press "Browse repositories" button
  3. search:
    Visual Paradigm SDE for IntellIJ (Community edition) Modelling Case Tool
  4. install it.

You need to install proper software. Now it should works well.

I guess that UML Class Diagram is only available on Ultimate Edition.

To show UML diagram click right mouse button on specific class -> Diagrams -> Show diagram. Or you can in editor click Ctrl + Alt + Shift + U . You could append new classes to diagram by drag and drop. On the top of window you could choose more options. To save UML you should just click on save icon.

857k 100 100 gold badges 1.4k 1.4k silver badges 1.3k 1.3k bronze badges answered Jun 16, 2013 at 20:57 Michał Rowicki Michał Rowicki 1,424 1 1 gold badge 17 17 silver badges 28 28 bronze badges

I have already added it. But I don't know how to use it. I also try to search with many keyword eg.visual paradigm sde for intellij example,how to use,user manual etc.

Commented Jun 17, 2013 at 12:53

I just try to download Visual Paradigm SDE (Community edition) but cannot integrated to Android Studio because not an IntelliJ support version

Commented Jun 17, 2013 at 13:19 Commented Jul 5, 2013 at 4:30 @MichalRowicki So how do you use Visual Paradigm in Android Studio after you install it? Commented May 15, 2014 at 17:01 So is there no support for UML diagrams for Studio yet? Commented Jul 4, 2014 at 1:34

There is Code Iris which you can install by going to File -> Settings -> Plugins -> Browse Repositories, then find and choose Code Iris. Restart then you will have a new Code Iris tab.

answered Apr 18, 2016 at 13:56 user1626594 user1626594 Nice solution! I will play with your solution to make sure this is the best solution. Commented Apr 19, 2016 at 4:09 after installing it one can not use Android Studio anymore.. :S Commented Jun 14, 2016 at 9:29

@w3officefb It generates the connections click 'Create/Update Diagram' and select one of the 3 views.

– user1626594 Commented Jun 14, 2016 at 16:13 @Ewoks I am using Android Studio 2.1 and it seems to work fine for me :/ – user1626594 Commented Jun 14, 2016 at 16:15 AS 3.5 not opening after installing the plugin. Commented Sep 11, 2019 at 11:45

Update 24.3.2016

Good to know - it is possible to integrate VP into Android studio (in my case 1.5.1) now. Do not forget to backup your Android Studio settings (you can find them in Users%userName/.AndroidStudioX.X on Windows) ahead of installation.

I was trying to make it work, but created vp project did not contain any diagrams. Maybe someone else will have more luck.

I was using this manual http://www.visual-paradigm.com/support/documents/vpuserguide/2381/2385/66578_creatingauml.html to make Visual Paradigm working in Android studio, but action in 2. did not invoke dialogue in 3. So I Have asked Visual Paradigm support for help and they replied that Android Studio integration is not supported right now.

Reply from Visual paradigm reply from Apr 17 2015:

Thank you for your inquiry and I'm very sorry that at the moment we only support integrate with the standard IntelliJ IDEA, but not integrate with the Android Studio. We may consider to support it in our future release, and I'll keep you post once there any update on this topics. Feel free to contact me for any questions and wish you have a good day!

This post was deleted, so I will try to make it more clear.

As such I am considering previous answers as misleading and not useful. Therefore I thing that it is important for others to know that, before they lose their time trying to make it working.