Code Generation 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.


Access     View | Toolbars | 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 Model


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.



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.



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.




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.



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 clicking on the View | Toolbars | Code Generation menu option