Synchronize Code

Return to Introduction  Previous page  Next page

Enterprise Architect uses code templates during the forward synchronization of the following programming languages:

·ActionScript
·C
·C++
·C#
·Delphi
·Java
·PHP
·Python
·VB
·VB.Net

Only a subset of the code templates are used during synchronization. This subset corresponds to the distinct sections that Enterprise Architect recognizes in the source code. The following table lists the code templates and their corresponding code sections, which can be synchronized.

Code Template

Code Section

Class Notes

Comments preceding class declaration.

Class Declaration

Up to and including class parents.

Attribute Notes

Comments preceding Attribute declaration.

Attribute Declaration

Up to and including terminating character.

Operation Notes

Comments preceding operation declaration.

Operation Notes Impl

As for Operation Notes.

Operation Declaration

Up to and including terminating character.

Operation Declaration Impl

Up to and including terminating character.

Operation Body

Everything between and including the braces.

Operation Body Impl

As for Operation Body.

Three types of change can occur in the source when it is synchronized with the UML model:

·Synchronize Existing Sections: for example, changing the return type in an operation declaration
·Add New Sections to Existing Features: for example, adding notes to a class declaration, where there were previously none
·Add New Features and Elements: for example, adding a new operation to a class.

Each of these changes must be handled differently by Enterprise Architect; their effect on the CTF is described in the following sections.