Book a Demo

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

Prev Next

Code Engineering Toolbar

The Code Generation (Engineering) toolbar provides options to import, generate, synchronize and open source code. Some of these options display convenient menus to quickly set, for example, the default language and default database type for the project.

Code Generation toolbar in Sparx Systems Enterprise Architect.



Explore > Portals > Show Toolbar > Code Engineering

Code Generation Toolbar Options



See also

Default Code Language

Click on the drop-down arrow and click on a coding language in the list, to set that language as the default applied to all newly created Class elements.

Language Options

Default Database Type

Click on the drop-down arrow and click on a database type in the list, to set that database type as the default applied to all newly created database elements.

Physical Data Models


Click on the drop-down arrow to locate and select source files to import for reverse engineering code into new Class and Interface elements in the current diagram.

Firstly, click on a coding language in the drop-down list to identify the file types to locate; this selection overrides the project's default language for this particular import.

When you have selected a language, a browser dialog displays through which you browse for the file location and select from files with the extensions appropriate to the coding language you selected.

When you click on a file, the system immediately imports it and generates elements from the file, in the current diagram. The progress of the reverse engineering is shown on a 'Progress' dialog; click on the Close button when the process is complete.

Notes on Source Code Import

Generate Source Code

Click on this option to generate source code for the currently selected single Class element, through the 'Generate Code' dialog.

Shortcut: F11

Generate a Single Class

(Batch) Generate Source Code

Click on this option to batch-generate source code for multiple selected Class elements.

A 'Progress' dialog displays and, if no target file is specified in the element, a prompt for the location of a file to generate the code into.

Shortcut: Shift+F11

Generate a Group of Classes

Synchronize Element with Source

Click on this option to synchronize the selected Class element with its associated source code.

The synchronization completes as a background task.

Shortcut: F7

Open Source Code

Click on this option to open the source code of the selected Class, in the default code editor.

The source code must have been generated, and the selected element must be a Class. Otherwise no action is taken.

Shortcut: F12

Editing Source Code


  • You can move this toolbar to any dockable position and it retains that position in subsequent sessions
  • You can hide or show the toolbar by selecting the 'Explore > Portals > Show Toolbar > Code Engineering' ribbon option