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
- Synchronizing the model from the source code
- Performing code analysis
- Accessing tools such as the Debugger, Profiler, Execution Recorder and the Testpoints Window
- Working with language grammars
- Managing code templates and defining the way source code is imported into and generated from your model
Available Facilities
Facility |
Description |
See also |
---|---|---|
Create From Pattern |
Click on this icon to display the Patterns window, through which you can generate:
|
Application Patterns (Model + Code) Samples |
Edit |
Click on this icon to open a file browser through which you locate and open the required code file to edit. |
|
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. You have three options:
All three options display the Code Editor window, but show the appropriate features, code and editing options for the type of code identified by the option. |
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 |
Options |
Click on the drop-down arrow to display a list of options for managing templates, which determine the way source code is imported into and generated from your model.
|
Local Paths Dialog Namespaces Language Macros Coding Data Types The Code Template Editor Reset Options |
Execution Analyzer |
Click the drop-down arrow to access a menu of Analyzer tools.
|
Managing Analyzer Scripts The Testpoints Window Object Workbench Debugging Profiling The Recording History Build Scripts |
Grammar Editor |
Display the Grammar Editor window, an advanced facility that allows you to view, add, edit and manage language grammars, used for importing source code. |
Editing Grammars |
Code Analyzer |
The Code Analyzer can perform very complex queries on source code repositories at lightning speed either locally or on a Sparx Intel Cloud service, allowing code metrics to be queried much faster than conventional methods. |
Code Analyzer |