Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Contents |
Prev | Next |
Using the Source Code Panel
The 'Source Code' panel brings together a number of facilities for working with source code. Here you can import existing source code files into your model, creating new model elements that represent the classes in those files. You can select a Class in your model, then click a button to open the code editor window and automatically load the source code file associated with that Class. Facilities for editing Code Generation Templates and Language Grammars are also accessed from this panel, as are the commands to generate source code from the model and synchronize the model from the source code.
Available Facilities
Facility |
Description |
See also |
---|---|---|
Edit Code |
This icon provides a collection of tools for viewing and editing source code files associated with elements in the current model. Also provided are tools that generate source code for a particular element or synchronize an element to reflect changes in its associated source code file.
|
|
Import Code |
Click on the drop-down arrow to display a list of options for importing code from a variety of sources, selecting from a range of popular coding languages.
|
Importing Source Code |
Configure |
Click on the drop-down arrow to display a list of options for managing templates and grammars, which determine the way source code is imported into your model and generated from your model
|
Editing Grammars Local Paths Dialog The Code Template Editor |
Generate |
Use this command to generate source code for the currently selected model elements. Source code is generated into the file that is associated with each individual element. Code is generated only for elements that are of type Class or Interface. |
Generate a Single Class |
Synch |
Use this command to synchronize the currently selected model elements, with their associated source code files, updating the elements in the model. |
Synchronize Model and Code |
Generate All |
Use this command to generate source code for all of the elements in the currently selected Package. Source code is generated into the file that is associated with each individual element. Code is generated only for elements that are of type Class or Interface. |
Generate a Package |
Synch All |
Use this command to synchronize all elements in the currently selected Package, with their associated source code files, updating the elements in the model. |
Synchronize Model and Code |
Learn more