The Code Template Editor

The Code Template Editor provides the facilities of the Common Code Editor, including intellisense for the various macros. For more information on intellisense and the Common Code Editor, see the Code Editors topic.

To access the Code Template Editor window, select the Settings | Code Generation Templates menu option.



Use to


Select the programming language.

New Language

Display the Programming Languages Datatypes dialog, which enables you to include programming languages other than those supported for Enterprise Architect, for which to create or edit code templates.


Display the contents of the active template, and provides the editor for modifying templates.


List the base code templates. The active template is highlighted. The Modified field indicates whether you have changed the default template for the current language.

Stereotype Overrides

List the stereotyped templates, for the active base template.

The Modified field indicates whether you have modified a default stereotyped template.

Add New Custom Template

Invoke a dialog for creating a custom stereotyped template.

Add New Stereotyped Override

Invoke a dialog for adding a stereotyped template, for the currently selected base template.

Get Default Template

Update the editor display with the default version of the active template.


Overwrite the active templates with the contents of the editor.


If you have overridden the active template, the override is deleted and replaced by the corresponding default code template.

For information on creating and editing code templates using the Code Template Editor window, see The Code Template Editor in MDG Development.


User-modified and user-defined Code Templates can be imported and exported as Reference Data (see the Sharing Reference Data topic. The templates defined for each language are indicated in the Export Reference Data dialog by the language name with the suffix _Code_Templates. If no templates exist for a language, there is no entry for the language in the dialog.