The Generate Code Dialog

Return to Introduction  Previous page  Next page

The Generate Code dialog enables you to control how and where your source code is generated. Normally you access this dialog from the context menu of a single class or interface. Right-click on the class or interface and select Generate Code from the context menu. Alternatively, select the class or interface and press [Ctrl]+[G].


This dialog has the following options:

·The Path where the source is to be generated. Click on the [...] (Browse) button to display a file browser dialog.
·The Target Language for generation. Click on the drop-down arrow and select the language to generate; this becomes the permanent option for that class, so change it back if you only want to do one pass in another language.
·Advanced. Click on this button to define advanced settings.  Note that the settings you make here only apply to the current class.
·Import(s)/Header(s) (1). An area in which you enter any special import statements (or #includes in C++). For C++ this area is placed in the header file.
·Import(s)/Header(s) (2). An area in which you define additional import or include statements (or even macros and #defines in C++). In C++ this area is placed in the CPP file, in Java it is appended to the first import statements and placed in the .java file.
·Generate. Click on this button to generate your source code; Enterprise Architect displays the status of progress as the generation proceeds.
·View. Click on this button to view the generated source code in your default editor. You can also set up the default editor on the DDL page of the Options dialog (Tools | Options | Source Code Engineering | Code Editors).