How to create Kotlin diagrams and UML?

How do I create UML and diagrams for Kotlin code? I don't think getting a paid version of Intellij is an option for me. I am trying to use Intellij plugins and I have not found anything that works yet.

I would like to generate diagrams and uml from the Kotlin code that I already wrote. Such a tool will save me a lot of time.

thanks

+9
source share
2 answers

you can only click on the package in the project tree and click "Show chart ...". It also generates a diagram in terms of Java (shows Java signatures and facade classes)

enter image description here

+4
source

Maybe this will help others.

Currently, an existing class diagram generator, such as SimpleUML (you can download it from the plugin repository for Android studio), cannot create a Kotlin class diagram. But you can use this plugin for Kotlin effortlessly.

Open the activity lesson in android studio.

Go to tool → Kotlin → Show Kotlin bytecode. A new side tab will open, which will show the bytecode of the selected activity class.

Click on the top decompilation of the generated Kotlin bytecode that the className.decompile.java class generates.

Click on the class name, and then right-click. In many options, click "Add to simpleUML diagram". Create a new one or add a chart to an existing file.

If you have any problems, let me know.

Note: - If you install SimpleUML, this may create a problem. Make sure you download SimpleUMLCE for best performance.

+3
source

Source: https://habr.com/ru/post/1273441/


All Articles