Custom templates enable you to generate an element in many different ways. Enterprise Architect enables you to define custom templates that are associated with given elements and call these templates from existing templates. You can even add stereotype overrides to your custom templates. For example, you might want to list all of your parameters and their notes in your method notes.
To create a new custom template, follow the steps below:
1. | Select the menu option, or press . The Code Templates Editor tab opens. |
2. | In the field, click on the drop-down arrow and select the appropriate language. |
3. | Click on the button. The Create New Custom Template dialog displays.

|
4. | In the field, click on the drop-down arrow and select the appropriate element. The elements currently supported are: |
5. | In the field, type an appropriate name, then click on the button. |
6. | On the Code Templates Editor tab, the new template displays in the Templates list with the value in the field. The template is called <Element Type>__<Template Name> - for example, Parameter__JavaDoc. |
7. | Select the appropriate template from the Templates list and edit the contents in the field to meet your requirements.

|
8. | Click on the button. This stores the new stereotyped template in the .EAP file. The template is now available from the list of templates and via direct substitution for use. |