Prev Next

Synchronize Code

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

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

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

  • Existing sections are synchronized: for example, the return type in an operation declaration is updated
  • New sections are added to existing features: for example, Notes are added to a Class declaration where there were previously none
  • New features and elements are added: for example, a new operation is added to a Class

Each of these changes has a different effect on the CTF and must be handled differently by Enterprise Architect, as described in these topics:

  • Synchronize Existing Sections
  • Add New Sections to Existing Features
  • Add New Features and Elements

Code sections that can be synchronized

Only a subset of the CTF base templates is used during synchronization. This subset corresponds to the distinct sections that Enterprise Architect recognizes in the source code.

Code Template

Code Section

Class Notes

Comments preceding the Class declaration.

Class Declaration

Up to and including the Class parents.

Attribute Notes

Comments preceding an Attribute declaration.

Attribute Declaration

Up to and including the terminating character.

Operation Notes

Comments preceding an operation declaration.

Operation Notes Impl

As for Operation Notes.

Operation Declaration

Up to and including the terminating character.

Operation Declaration Impl

Up to and including the terminating character.

Operation Body

Everything between and including the braces.

Operation Body Impl

As for Operation Body.

Learn more