How to Reverse Engineer UML from CORBA IDL?

Instant reverse is a process to produce UML class model from a given input of source code. With instant reverse, you can reverse a snap shot of your code-base to UML classes and form class diagram in further. By bringing code content into visual UML model, this helps programmers or software engineers to review an implementation, identify potential bugs or deficiency and look for possible improvements. Apart from this, developers may reverse a code library as UML classes and construct model with them, like to reverse a generic collection framework and develop your own framework by extending the generic one. In this chapter, we will go through the instant reverse of CORBA IDL source files.

Reverse engineering UML classes from source files

  1. Select Tools > Code > Instant Reverse... from the toolbar.
  2. In the Instant Reverse window, select CORBA IDL source files as the Language.
  3. Specify the path of the source file or the folder that contains those files.
    The Instant Reverse window
    The Instant Reverse window
  4. You can place reversed classes to specific model. For example, to place legacy code to a model named Old, to place system prototype to a model named Prototype and so forth. To do this:
    1. Click on the ... button at the end of the Reverse to Model row.
    2. In the Select Parent Model window, either select an existing model or create one by clicking New Model.
    3. Click OK to confirm.
  5. Click OK to start reversing.
  6. Upon finishing, you will see the Instant Reverse Form Diagram window appear. If you want to form a class diagram with the reversed classes, select the classes to form diagram, configure the options and click OK to proceed. Read the next section for detail. If you do not want to form diagram now, click Cancel to exit.
    NOTE: By cancelling from forming diagram, it just means you do not want to form diagram with the reversed classes for the time being.
    You can still look for the classes in Model Explorer or Class Repository and possibly form diagram later on manually.

Overview of Instant Reverse

The instant reverse window
The instant reverse window
No. NameDescription
1 Language The language of source to reverse.
2
Update type

Determine how to handle duplicated classes by selecting the Update Type. Below is a description of the update types:

Update duplicate class(es) - Update existing class(es) by source.

Replace duplicate class(es) - Discard existing class(es), overwrite by reversed source.

3 Path The path of source to reverse.
4 Reverse to model Place reversed classes to specific model. For example, to place legacy code to a model named Old, to place system prototype to a model named Prototype and so forth.
5 Reverse to diagram Whether or not to reverse engineering class diagram/package diagram from source files. UML packages and the relationships in between will be produced.
6 OK Click to start reversing.
7 Cancel Click to close instant reverse.
8 Help Click to read the Help contents.
Overview of instant reverse window

Forming class diagram from reversed classes

By the end of an instant reverse operation, you will be asked whether or not to form a class diagram with reversed UML classes. By selecting classes and configuring the way to present them and confirm, a diagram will then be formed.

The Instant Reverse Form Diagram window
The Instant Reverse Form Diagram window
NOTE: If you do not want Visual Paradigm to ask you for forming diagram next time you perform instant reverse, uncheck Show this window after instant reverse.

Below is a description of this window, base on the tabs.

Select Class

The classes that are listing in the tree are those reversed from your code-base. You must select at least one class in order to form a class diagram. Notice that forming diagram can be a costly operation if you have selected too many classes in forming diagram.

Form Diagram Options

Option Description
Show superclasses
Show the generalization relationships between the selected elements and their super classes (ancestors) in the new diagram.
Show subclasses
Show the generalization relationships between the selected elements and their subclasses (descendants) in the new diagram.
Show suppliers (interface)
Show the realization relationships between the selected elements and their suppliers (interfaces) in the new diagram.
Show clients Show the realization relationships between the selected elements and their clients (classes that implements them) in the new diagram.
Show navigable classes Show the association relationships between the selected elements and their navigable classes (targets) in new diagram.
Show non-navigable classes Show the association relationships between the selected elements and their non-navigable classes (sources) in the new diagram.
Show containers Show the containment relationships between the selected elements and their containers (e.g. packages) in the new diagram.
Show residents

Show the containment relationships between the selected elements and their containers (e.g. packages) in the new diagram.

Single level only - Show one level residents only in the new diagram.

All levels in single diagram - Show all level residents in the new diagram.

All levels in sub diagrams - Show all level residents in the new diagrams (multiple single level diagrams).
Show as containment relationships

Show the containment relationships as connectors in the new diagram.

Notes: The containment relationships between classes are shown as connectors.


Description of form diagram options

Presentation Options

Option Description
Attribute options

Show all - Show all attributes of classes in the new diagram.

Public only - Show all public attributes of classes only in the new diagram.

Hide all - Hide all attributes of classes in the new diagram.

Initial values - Show initial values of attributes of classes in the new diagram.

Operation options

Show all - Show all operations of classes in the new diagram.

Public only - Show all public operations of classes only in the new diagram.

Hide all - Hide all operations of classes in the new diagram.

Initial values - Show initial values of operations of classes in the new diagram.
Type options

Fully-qualified - Show fully-qualified name of types.

Name only - Show name of types.

Relative - Show name of types relative to this class.


Description of presentation options

Reverse engineer package diagram from source files

By reverse engineering package diagram from source files, UML packages and the relationships in between will be produced.

  1. Select Tools > Code > Instant Reverse... from the toolbar.
  2. In the Instant Reverse window, select CORBA IDL source files as the Language.
  3. Specify the path of the source file or the folder that contains those files.
    The instant reverse window
    The instant reverse window
  4. Select Package Diagram for Reverse To:.
  5. You can place reversed packages to specific model. To do this:
    1. Click on the ... button at the end of the Reverse to Model row.
    2. In the Select Parent Model window, either select an existing model, or create one by clicking New Model.
    3. Click OK to confirm.
  6. Click OK to start reversing.

Related Resources

The following resources may help you to learn more about the topic discussed in this page.

 
3. Reverse engineering of .NET dll and exec files Table of Contents 5. Reverse engineering of Ada 9x source files

We use cookies to offer you a better experience. By visiting our website, you agree to the use of cookies as described in our Cookie Policy.OK