Prev | Next |
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 are also provided for issuing commands to generate source code from the model and to synchronize the model from the source code.
Available Facilities
Facility |
Description |
See also |
---|---|---|
Behavior |
Click on this icon to display the Source Code editor, to create or edit Behavior code for the operations in the selected element, or in the parent of the selected operation. |
Behavior Code |
Solutions |
Click on the drop-down arrow to display a list of options for importing project code from certain popular development products into the current project. For example:
Having imported the material, you can perform a comparison between the external project source code and the Enterprise Architect model to check for Class differences, using the 'Compare with Model' option, and you can refresh the Enterprise Architect model to update it with any changes to the source. |
Import Projects |
Files |
Click on the drop-down arrow to display a list of options for importing code files into the current model from a variety of sources, selecting from a range of popular coding languages.
You can also import:
If you have developed model structures for any customized programming language, those languages are also included in the list. |
Import Binary Module Import a Directory Structure Importing Source Code |
Generate |
Click on this icon to display options to generate source code for:
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 Generate a Group of Classes Generate a Single Class |
Synchronize |
Click on this icon to display options to synchronize the currently selected model elements with their associated source code files, or to synchronize the whole Package containing the selected elements. |
Update Package Contents Synchronize Model and Code |