Code Template Framework

The Code Template Framework (CTF) is used for:

Forward engineering of UML models
Behavioral Code generation
Model Driven Architecture (MDA) Transformations


This section discusses how you can customize the way in which Enterprise Architect:

Generates source code, using the Code Template Editor, and
Transforms models, using the Transformation Template Editor





See also

Code Templates

When forward engineering a Class model, the code templates define how the skeletal code is to be generated for a given programming language.

The templates are written as plain text with a syntax that shares some aspects of both mark-up languages and scripting languages.

Enterprise Architect provides a set of Base Templates that you can add to or adapt if required.


Code Template Framework

Code Template Syntax

Base Templates

The Code Template Editor in MDG Development


Model Transformation Templates

Model Transformation Templates provide a fully configurable method of defining how Model Driven Architecture (MDA) Transformations convert model elements and model fragments from one domain to another.

This process is two-tiered. It creates an intermediary language (which can be viewed for debugging) which is then processed to create the objects.


Transformation Templates

Write Transformations

Intermediary Language

Behavioral Code Generation Templates

Enterprise Architect supports user-definable code generation of the UML behavioral models.

This uses the standard Code Template Framework but includes specific Enterprise Architect Simulation Library (EASL) code generation macros.

The Code Template Editor in MDG Development

EASL Code Generation Macros


Learn more