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

Use to:

  • Configure code generation options

Reference:

Field

Usage

See also

Always synchronize with existing file (recommended)

Indicates that imported code synchronizes with an existing file

 

Replace (overwrite) existing source file

Indicates that imported code overwrites an existing source file

 

Component Types

Allows for the importation of component types, this opens the Import component types dialog

Import Component Types

Default Language for Code Generation:

Indicates the default coding language used in code generation

 

Wrap long comment lines at:

Specifies the line length to wrap comments within

 

Auto Layout Diagram on Import:

Specifies if and when a diagram is automatically generated on code import

 

Output file use both CR & LF

Indicates if carriage return and line feed is a used; ensure that this option is set according to what operating system is currently in use as code might not render correctly

 

Prompt when synchronizing (reversing)

Ensures that a prompt displays when synchronization occurs

 

Remove hard breaks from comments on import

Indicates that hard breaks are removed from commented sections on importation

 

Auto generate role names when creating code

Indicates that role names are generated when creating code

 

Do not generate role names when creating code

Indicates that role names are not generated when creating code

 

Do not generate members where association direction is "Unspecified"

If association direction is "unspecified", members are not generated

 

Create dependencies for operation returns and parameter types

Creates dependencies for operation returns and parameter types

 

Comments: Generate

Indicates that comments are generated

 

Comments: Reverse

Indicates that reverse comments are generated

 

Remove prefixes when generating Get/Set properties

Enables specification of prefixes used in your variable naming conventions, if those prefixes should be removed in the variables' corresponding get/set functions

 

Treat as suffixes

Treats the prefixes defined within Remove prefixes when generating Get/Set properties as suffixes

 

Capitalized Attribute Name for properties

Capitalizes Attribute names for properties

 

Use "Is" for Boolean property Get()

Indicates that the Is keyword is used for the Boolean property Get()

 

Code page for source editing

Specifies the character embedding format

 

Notes:

  • It is worthwhile to configure these settings, as they serve as the defaults for all Classes in the model; you can override these on a per-Class basis using the custom settings (from the Code Generation dialog)