Astah supports modeling in Java, C++, and C#. If you are modeling in Java, set so in Astah first.
Select a root package on a tree and check [Java] in the bottom pane.
Then Java options in [Language] tab become available for Classes, Attributes, and Operations.
TIPS – Set Java to a project by default
You can set Java as your programming language to Astah by default from [Tools] – [System Properties ] – [Project].
Import Java Source Code
You can import Java source code and generate Class diagrams with the models.
Go to [Tools] – [Java] – [Import Java].
Choose .java files you want to import and click [OK]. Make sure you select the right encoding.
Choose attributes that you want to import as associations.
Imported models are added on the tree.
Auto-generate Class Diagram
You can auto-create a Class diagram with imported models.
Right-click on a package or class and choose [Auto Create Class Diagram].
Generate diagram is opened in the Diagram Editor.
TIPS – Use Auto-layout
After generating a diagram, you can auto-layout from [Alignment] menu.
Use Reverse Plug-in
Astah’s Easy Code Reverse Plug-in is the easiest way to reverse source code from Github, Bitbucket, and Gooogle Project Hosting into a UML class diagram just by drag-and-dropping the URL a repository or the .java source code files directly on to Astah!