Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Developing Programming Languages

You can make use of a range of established programming languages in Enterprise Architect, but if these are not suitable to your needs you can develop your own. You would then apply it to your models through an MDG Technology that you might develop just for this purpose, or for broader purposes. After developing the language, you could also write MDA Transformation templates to convert a Product Independent Model or a model in another language into a model for your new language, or vice-versa.

Access     Tools | Source Code Generation Templates   (Ctrl+Shift+P)

Develop a Programming Language



See also


In the Code Template Editor, click on the New Language button and, on the Programming Languages Datatypes dialog, click on the Add Product button.

Enter your new programming language name and define the datatypes for it. You cannot access the new language in the Code Template Editor until at least one datatype has been added to the language.


Data Types


After you have defined all the datatypes you need, click on the Close button, select the language in the Language field of the Code Template Editor, and start to edit or create the code templates for the new language.

The code templates define how the system should perform:

Forward code engineering of your models in the new language
Behavioral Code generation (if this is appropriate)


Code Template Framework

Code and Transform Templates

Create Custom Templates

Customize Base Templates


If you wish, you can also define source code options for your new language. These are additional settings for the language that are not covered by the data types or code templates, that help define how the system handles that language when generating and reverse-engineering code.

The code options are made available to your models only through an MDG Technology.


Define Code Options



Defining a grammar for your language is an optional step that provides two primary benefits:

Reverse engineering of existing code into your model
Synchronization during code generation so that changes made to the file since it was last generated are not lost.

To access the grammar editor select Analyzer | Grammar Editor.

Grammar Framework


If you intend MDA transformations to be made to (or from) your new programming language, you can also edit and create transformation templates for it. The process of creating transformation templates is very similar to that for creating code templates.


Transformation Templates

Write Transformations


Having created the datatypes, code templates, code options, grammar and transformation templates for your new language, you can incorporate and distribute them in an MDG Technology.

Create MDG Technologies

Add Code Modules

Add MDA Transforms

Deploy An MDG Technology