Generate a Group of Classes

In addition to being able to generate code for an individual Class, you can also select a group of Classes for batch code generation. When you do this, you accept all the default code generation options for each Class in the set.

How to



See also


Select a group of Classes and/or interfaces in a diagram.




Right-click on an element in the group to display the context menu.




Select the Code Generation | Generate Selected elements menu option.

If no code exists for the selected elements, the Save As dialog displays on which you specify the file path and name for each code file; enter this information and click on the Save button.




The Batch Generation dialog displays, showing the status of the process as it executes (the process might be too fast to see this dialog).

If code already exists for the selected Class elements, and changes have been made to the Class name or structure, the Synchronize Element <package name> .<element name> dialog might also display; this dialog helps synchronize the model and code.




Synchronize Model and Code


If any of the elements selected are not Classes or interfaces the option to generate code is not available

Learning Center:

(Alt + F1) | Software Engineering | Generate Code | Generate Multiple Classes