Prev Next

Customize Base Templates

Enterprise Architect provides a wide range of templates that define how code elements are generated. If you want to change the way a code element is generated, you can customize the appropriate templates. Your changes might be to the effect of the template itself, or to its calls to other templates. You can also add stereotype overrides to your customized templates; for example, you might list all of your parameters and their notes in your method notes.

When you customize a system-provided (base) template, you effectively create a copy of the template that is used in preference to the original. All subsequent changes are to that copy, and the original base template is hidden. If you subsequently delete the copy it can no longer override the original, which is then brought into use again.

Access

Ribbon

Code > Configure > Options > Edit Code Templates

Keyboard Shortcuts

Ctrl+Shift+P

Customize a base template

Step

Description

See also

1

On the Code Template Editor, in the 'Language' field, click on the drop-down arrow and select the programming language for which you want to customize the base templates.

2

In the Templates list, click on the base template to edit.

3

Update the template.

Code Template Syntax

4

Click on the Save button to store your changes.

5

Repeat steps 2 to 4 for each of the relevant base templates you want to customize.

6

If you prefer, add one or more stereotype overrides to any of the templates.

Add New Stereotyped Templates