Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Source Code Options
When you generate code for a particular language, you can set certain options. These include:
• | Create a default constructor |
• | Create a destructor |
• | Generate copy constructor |
• | Select default language |
• | Generate methods for implemented interfaces |
• | Set the Unicode options for code generation |
Access Tools | Options | Source Code Engineering
Configure code generation options
Field |
Action |
See also |
Always synchronize with existing file (recommended)
|
Select the radio button to synchronize imported code with an existing file. |
|
Replace (overwrite) existing source file
|
Select the radio button to overwrite the existing source file with imported code . |
|
Component Types |
Click on this button to open the Import component types dialog, to set up the importation of component types.
|
|
Default Language for Code Generation
|
Click on the drop-down arrow and select the default coding language for code generation. |
|
Wrap long comment lines at |
Type in the number of characters to allow in a comment line before wrapping the text to the next line.
|
|
Auto Layout Diagram on Import
|
Click on the drop-down arrow and select if and when a diagram is automatically generated on code import. |
|
Output file use both CR & LF |
Select the checkbox to include carriage returns and line feeds; set this option according to what operating system is currently in use, as code might not render correctly.
|
|
Prompt when synchronizing (reversing)
|
Select the checkbox to display a prompt when synchronization occurs. |
|
Remove hard breaks from comments on import |
Select the checkbox to remove hard breaks from commented sections on importation.
|
|
Auto generate role names when creating code
|
Select the checkbox to generate role names when creating code. |
|
Do not generate members where association direction is "Unspecified"
|
Select the checkbox to prevent generation of members if the Association direction is unspecified. |
|
Create dependencies for operation returns and parameter types
|
Select the checkbox to generate dependencies for operation returns and parameter types. |
|
Comments: Generate |
Select the checkbox to generate comments.
|
|
Comments: Reverse |
Select the checkbox to generate reverse comments.
|
|
Remove prefixes when generating Get/Set properties
|
Type in the prefixes, separated by semi-colons, used in your variable naming conventions, to be removed in the variables' corresponding get/set functions. |
|
Treat as suffixes |
Select the checkbox to use the prefixes defined in the Remove prefixes when generating Get/Set properties field as suffixes.
|
|
Capitalized Attribute Name for properties
|
Select the checkbox to capitalize Attribute names for properties.
|
|
Use "Is" for Boolean property Get()
|
Select the checkbox to use the Is keyword for the Boolean property Get(). |
|
Code page for source editing |
Click on the drop-down arrow and select the character embedding format to apply.
|
|
Notes
• | It is worthwhile to configure these settings, as they serve as the defaults for all Classes in the model; you can override most of these on a per-Class basis using the custom settings (from the Code Generation dialog) |
Learn more