Code Engineering (Package) Submenu

As you develop your model, you can generate code from the elements in a Package (forward engineering) and create and update model elements from source code that you import into the project (reverse engineering) using any of a range of programming languages. That is, you perform forward and reverse engineering at both element and Package level.

Access Package | Code Engineering

Source Code Engineering Options

Option

Action

See also

Generate Source Code for Package

Select this option to generate source code for the currently selected Package.

Shortcut: Ctrl+Alt+K

Generate a Package

Synchronize Package

Select this option to synchronize the selected Package with the source code.

Shortcut: Ctrl+Alt+M

Update Package Contents

Import

Select this option to import files of a range of types and programming languages into your model.

Import code files

Generate Current Element

Generate source code for the currently selected element.

Shortcut: F11

Generate a Single Class

Synchronize Current Element

Synchronize the selected Class with the source code.

If a problem arises, an error message displays. Otherwise the synchronization just proceeds in the background until complete.

Shortcut: F7

Batch Generate Selected Element(s)

Batch generate source code for the currently selected element(s).

The operation proceeds in the background until complete. If any problems arise, an error message displays.

Shortcut: Shift+F11

Batch Synchronize Selected Element(s)

Batch synchronize the currently selected element(s) with source code.

The operation proceeds in the background until complete. If any problems arise, an error message displays.

Shortcut: Ctrl+R

Open Source Directory

Open the directory containing the source for this element.

A browser displays, through which you locate the source code file for the element. Double-click on the file to open the code in the default external viewer for the code language.

Shortcut: Ctrl+Alt+Y

Show Source Viewer

Select this option to view and edit the source code that has already been generated for the element, or write new code, in the Source Code window.

Shortcut: Alt+7

Editing Source Code

Open Source in External Editor

Select this option to open the source code of the selected Class in an editor external to Enterprise Architect (defined in the 'Editor' field on the 'Language Options' page for the programming language of the Class).

Source code must have been generated, and the selected element must be a Class.

Shortcut: F12

Language Options Editing Source Code

Code Generation Templates

Modify code generation templates using the Code Templates Editor.

Shortcut: Ctrl+Shift+P

The Code Template Editor

Notes

  • Source Code Engineering is available in the Professional, Corporate, Business and Software Engineering, Systems Engineering and Ultimate editions of Enterprise Architect

Learn more