Reverse Engineering Source Code to Model and Diagrams
Code to UML
Source code can be transformed into UML diagrams using reverse engineering tools in Software Ideas Modeler. Classes from various supported programming languages can be turned into UML class diagrams where the class elements are connected with appropriate relationships (such as generalization, association, etc.). The UML generator can also produce package diagrams based on packages and namespaces defined in the source code files. The code to UML transformation supports new diagram creation as well as update of existing diagrams.
Code to ERD
The reverse engineering feature includes entity-relationship diagram generation. The classes in the source code can be turned into ERD entities. During code to ERD transformation, unsupported items will be omitted, e.g. operations that are not supported by the ERD notation.
How to Create Diagrams from Code
The reverse engineering feature is available in:
- Ribbon / Process tab / Reverse Engineering group / Source Code
- Menu / Tools / Reverse Engineering / Source Code
The action will open the Source Code Import dialog that helps you to reverse engineer your source code into a diagram or a set of diagrams. The dialog offers two tabs: General and Settings.
General Tab
In the General tab, you can choose a programming language (C#, C++, Dart, Java, JavaScript, Object Pascal, PHP, Python, Ruby, SQL DDL, Visual Basic) that is used in the source code you want to process. The tab offers various options on how to choose the source code files. You can import the files by a project file (only for some programming languages). The other options are available for all programming languages - you can add individual files with the source code using the Add Files button or add all the files from a chosen folder using the Add Directory button.
The three other buttons Select All, None, and Invert allow you to adjust which files from the list you want to process. This way, you can load all files from a project to the list but choose only some of them to import into the model.
Reverse Engineering Settings
The Settings tab offers other options which are essential in adjusting the output of reverse engineering.
The Objects group allows you to choose which types of entities you want to import. You can pick from several entity types:
- Classes - to generate UML class diagrams from code
- Packages - to generate UML package diagrams from code
- ERD entities - to generate ERD diagrams.
The group Diagramming includes settings for the diagram output configuration. If the option 'Add new elements to diagram' is checked, the new elements will be added to a new diagram. Otherwise, only the models will be imported. (You can manually insert the elements into your diagrams later.)
You can choose a target folder for the new diagrams. Click on the button with the ellipsis to select the folder from the project tree.
The option 'Create hierarchy by namespace' activates the automatic creation of subfolders by the namespaces/packages in the source project.
In the Model group, you can configure how to process the changes in the project model. There are the following options:
- Update existing elements - if the elements were already imported, their model will be updated according to the changes in the source project. If this option is unchecked, the new version of the element will be imported as a separate element.
- Delete missing elements - if the element that was already imported is not present in the source project anymore, it will be removed during the processing.
Repository for model elements - allows you to choose a project repository (project, folder, diagram), in which will be the new elements imported.
- Default repository - the target folder for the diagram will be used as the model repository. If it is not defined, the first folder in the project will be used instead.
- Custom repository - you can click on the ellipsis button to choose the repository in the project tree.
After clicking on the OK button, reverse engineering will process the source project by the settings (the new elements will be added to the model, some elements can be updated, the new diagrams can be created). You can also undo the action later.
Balbir Singh 3 August 2022 14:44:55
Failing to open 'Source Code' dialogue
Dusan Rodina - softwareideas.net 4 August 2022 11:02:27
RE: Failing to open 'Source Code' dialogue
Samar 2 November 2022 21:54:41
the meaning of underline
Dusan Rodina - softwareideas.net 4 November 2022 15:28:55
RE: the meaning of underline
Nithin Kalyan 17 May 2023 15:45:41
Software
Dusan Rodina - softwareideas.net 17 May 2023 16:15:05
RE: Software
Diego 21 July 2023 10:25:05
Can't use reverse engineering.
Dusan Rodina - softwareideas.net 21 July 2023 10:32:13
RE: Can't use reverse engineering.
Tara 10 October 2023 20:49:13
Missing multiple features on paid version
Dusan Rodina - softwareideas.net 10 October 2023 21:51:05
RE: Missing multiple features on paid version
william 14 October 2023 23:44:40
Reverse-engineering from open api specification
Dusan Rodina - softwareideas.net 16 October 2023 8:33:34
RE: Reverse-engineering from open api specification
Bart 22 October 2023 12:07:03
Typescript tsx
Dusan Rodina - softwareideas.net 24 October 2023 13:55:40
RE: Typescript tsx
Anonymous 25 October 2023 18:08:26
RE: RE: Typescript tsx
Zdav 1 February 2024 14:40:33
reverse engineer java source code along with associations
Dusan Rodina - softwareideas.net 1 February 2024 14:51:36
RE: reverse engineer java source code along with associations
Zdav 1 February 2024 15:12:47
RE: RE: reverse engineer java source code along with associations
Dusan Rodina - softwareideas.net 2 February 2024 15:58:57
RE: RE: RE: reverse engineer java source code along with associations