Model enum in Astah

You can model enum in Astah – available in Astah Professional edition only.

How to model enum in Astah

1. Select the root package which is the project name in the Structure tree, and then go to the property view (the left bottom pane) which has various options you can set to this file. Open [Project Setting] tab and check the modeling language(s) you’d like to model with.
Astah_model_Enum_Java_1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2. Select a Class in the Structure Tree or directly on the diagram, then go to its Property view, open [Language] tab and then tick <<enum>> to enable you to model an Enum.
Astah_Model_Enum2

 

 

 

 

 

 

 

 

 

 

 

 

Same as Attributes, select an Attribute and then go to [Language] tab in its property view and tick <<enum>>.
Astah_Model_enum3
Hope this helps.
You can use Astah Professional for 50 days for free if you’d like to try it out from here:
Download Astah 50-day free trial 

Cheers,
SJ

2 thoughts on “Model enum in Astah

  1. How can i delete the type “int” of the enum constant “attribute0”? I have tried to delete it but the message “Attributes require a type” pops up everytime. I think that if the language is set to Java and enum as well astah has to recognize automaticly that enums don’t have any type.

    • Hi Ali,
      Yes, I feel the same, we want to delete the “int” of the enum constant Attribute.
      But technically enum constant’s type isn’t “none”, is the same type as enum’s. (Class1 in the sample on this blog article.)
      With that being said, you cannot empty Attribute type, so change the enum constant type from “int” to “Class1” and hide it from the diagram. To hide, right-click the Class, select [Extended Visibility] – [Attribute Type].

Leave a comment