Login | Register
My pages Projects Community openCollabNet

10.8. The Generation Menu

This menu provides support for code generation from UML diagrams. The functionality is built around the structural information of class diagrams.

[Note]Note

Without any plugin modules installed, ArgoUML supports only code generation of Java. ArgoUML V0.20 supports the following languages by plugin: C#, C++, php4, php5.

[Warning]Warning

Code generation is still very much a work in progress. The current version of ArgoUML will generate a structural template for your code, but is not able to handle behavioral specifications to generate code for the dynamic behavior of the model.

10.8.1. Generate Selected Classes ...

This menu entry brings up a dialog box for the ArgoUML code generator (see Figure 10.26, “The dialog for Generate Selected Classes....” ).

Figure 10.26. The dialog for Generate Selected Classes....

The dialog for Generate Selected Classes....

Below a label Available Classes the dialog box lists each of the selected classes by name with a check box to the left, for each language installed. All the checkboxes are initially unchecked. Checking any of these boxes will cause code generation for that class. Checking multiple languages for a class causes it to be generated in all these languages.

The buttons Select All and Select None may help when a lot of items have to be selected or deselected.

In the lower portion of the dialog box is an editable combo box labeled Output Directory to specify the directory in which code is generated. Within this directory, a top level directory will be created with the name of the model. Further sub-directories will be created to reflect the package/namespace hierarchy of the model. A drop down selector gives access to previously selected output directories.

Finally, at the bottom of the dialog box are two buttons, labeled Generate and Cancel. Button 1 click on the former will cause the code to be generated, button 1 click on the latter will cancel code generation.

10.8.2. Generate All Classes...

Shortcut F7.

This function behaves as Generate Selected Classes... (see Section 10.8.1, “Generate Selected Classes ...”) would with all classes in the current diagram selected.

10.8.3. Generate Code for Project... (To be Written)

10.8.4. Settings for Generate for Project... (To be Written)