Prev Next

The Code Template Editor

The Code Template Editor provides the facilities of the Common Code Editor, including Intelli-sense for the various macros. For more information on Intelli-sense and the Common Code Editor, see the Editing Source Code topic.

Access

Ribbon

Code > Configure > Options > Edit Code Templates

Keyboard Shortcuts

Ctrl+Shift+P

Options

Option

Action

See also

Language

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.

Programming Languages Datatypes

Template

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

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.

Save

Overwrite the active templates with the contents of the editor.

Delete

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

Notes

  • 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

Learn more