Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Importing Source Code
Topics:
Topic |
Detail |
See also |
Usage |
Reverse Engineering in Enterprise Architect enables you to import existing source code from a variety of code languages into a UML model. Existing source code structures are mapped into their UML representations, for example a Java Class is mapped into a UML Class element with the variables being defined as attributes, methods are modeled as operations and the interactions between the Java Classes being displayed in the UML model Class diagram with the appropriate connectors. Reverse Engineering enables users to examine legacy code and examine the functionality of code libraries for reuse or to bring the UML model up to date with the code that has been developed as part of a process called synchronization. Examining the code in a UML model enables user to identify the critical modules contained the code, enabling a starting point for understanding of the business and system requirements of the pre-existing system and to enable the developers to gain a better overall understanding of the source code. To begin the process of importing existing code into Enterprise Architect, an existing source of code must be imported into Enterprise Architect, which can be a single directory or a directory structure. Several options are available when performing the reverse engineering process. The Source Code Engineering Options topic contains several options that affect the reverse engineering process. These include:
It is important to note that when a legacy system is not well designed, simply importing the source into Enterprise Architect does not create an easily understandable UML model. When working with a legacy system that is poorly designed it is useful to break down the code into manageable components by examining the code elements individually. This can be achieved by importing a specific Class of interest into a diagram and then inserting the related elements at one level to determine immediate relationship to other Classes. From this point it is possible to create Use Cases that identify the interaction between the legacy Classes, enabling an overview of the legacy system's operation. |
|
Copyright Ownership |
Copyright ownership is an important issue to take into account when undertaking the process of reverse engineering. In some cases, software might have specific limitations that prohibit the process of reverse engineering. It is important that a user address the issue of copyright before beginning the process of reverse engineering code. Situations that typically lend themselves to reverse engineering source code include source code that:
|
|
Enterprise Architect currently supports reverse engineering in the following programming languages:
Reference:
Topic |
Link |
Action Script |
|
Ada 2005 (Systems Engineering and Ultimate editions) |
|
C |
|
C# |
|
C++ |
|
CORBA IDL (MDG Technology ) |
|
Delphi |
|
Java |
|
PHP |
|
Python |
|
SystemC(Systems Engineering and Ultimate editions) |
|
Verilog (Systems Engineering and Ultimate editions) |
|
VHDL(Systems Engineering and Ultimate editions) |
|
Visual Basic |
|
Visual Basic .NET |
Enterprise Architect is also able to reverse engineer certain types of binary files: Java .jar files and .NET PE files. See Import Binary Module for more information.
Notes:
- In the Corporate, Business and Software Engineering, System Engineering and Ultimate editions of Enterprise Architect, if security is enabled you must have Reverse Engineer From DDL And Source Code permission to reverse engineer source code and synchronize model elements against code
- Reverse Engineering of other languages is currently available through the use of MDG Technologies from www.sparxsystems.com/resources/mdg_tech/
Learn More:
- www.sparxsystems.com/resources/mdg_tech/ (Online Resource)