Previous Next
vpuml_user_guide Chapter 9 - Instant Reverse

Chapter 9 - Instant Reverse

VP-UML provides a handy way to reverse engineer various sources (including binary files) into UML class models. This feature is called Instant Reverse. The use of Instant Reverse is discussed in this chapter.

In this chapter:

What is Instant Reverse?

The Instant Reverse facility of VP-UML allows you to reversely engineer different types of source or binary files into UML class models, such as java source, java classes, C++ Source, JDBC, .NET binaries, etc...(More types will be supported soon). This chapter provides a brief description on the supported formats and the steps required to reverse engineer source codes into UML class models in VP-UML.

Supported Sources

Instant Reverse currently supports eleven types of sources (Instant Types), they are Java source, Java class, C++ source, .NET binaries, windows executables, JDBC, XML, XML schema, CORBA IDL source, PHP 5.0 source, Hibernate and Ada 9x Source.

For reversing Java source, you can supply a single source file or a directory. For reversing Java classes, you can supply a single class file, a jar file, a zip file or a directory. For reversing C++ source, you can supply a .cpp source file or a .h header file. For reversing .NET binaries, you must supply a single binary file (.dll or .exe), and the related files must in the same directory as the source file.

Supported Instant Type Extension Remarks
Java Source Dir/.java
Java Class Dir/.class/.jar/.zip
Dynamic Link Library .dll Must be created by Microsoft® Visual Studio .NET
Only one .dll file needs to be supplied. All other required .dll files will be looked up automatically.
Windows Executable .exe Must be created by Microsoft® Visual Studio .NET
XML .xml
XML Schema .xsd
C++ Source .h/.cpp
CORBA IDL Source .idl  
PHP 5.0 Source Dir/.php/.inc  
Hibernate .hbm.xml
JDBC Reverse the database schema of the specific database according to the given JDBC Connection URL.
Ada 9x Source .ada/.adb/.ads  
Table 9.1

Java Instant Reverse

Instant Reverse supports the reverse engineering of Java up to version 1.5. Besides, there are more advanced options for Java Instant Reverse compared to other languages.
Select menu Tools > Instant Reverse > Java..., the Instant Reverse dialog box appears with the Java Instant Reverse options for configuration.
Figure 9.1 - Java Instant Reverse Dialog

The buttons on the right are used for adding, removing and reordering of Java source/class paths.

Button Description
Add JARs... Select JAR files to add to the instant reverse paths.
Add Class Folder... Select class folders to add to the instant reverse paths.
Add ZIPs... Select ZIP files to add to the instant reverse paths.
Add Source Folder... Select source folders to add to the instant reverse paths.
Remove Remove selected instant reverse paths.
Up Move selected instant reverse paths upwards.
Down Move selected instant reverse paths downwards.
Table 9.2

Select the Reverse source on demand option if you want the paths to be reversed to UML models only when you request it (see the On-Demand Java Instant Reverse section later in this chapter for details). If this option is not selected, the instant reverse paths will be reversed to UML models once you click OK.

On-Demand Java Instant Reverse

After performed instant reverse of Java with the Reverse source on demand option selected, the Class Repository will have the reversed paths added under the Java Resources node.
Figure 9.2 - Class Repository

There are three kinds of on-demand Java instant reverse you can use, they are 'reverse to Class Repository', 'reverse to diagram' and 'reverse by drag-and-drop'.

Reverse to Class Repository

In the Class Repository's Java Resources node, select the desired resources to be reversed, right-click on the selection and select Reverse "<RESOURCE_NAME>" to Class Repository from the popup menu.

Figure 9.3 - Revert resources to Class Repository

The resources will be reversed to UML models and added to the project, but no diagrams or shapes will be generated.

Figure 9.4 - Resource reversed in Class Repository

Reverse to Diagram

In the Class Repository's Java Resources node, select the desired resources to reverse, right-click on the selection and select Reverse "<RESOURCE_NAME>" to from the popup menu to expand it.

Figure 9.5 - Revert resources to form a new diagram

If you select the New Class Diagram menu, a new class diagram will be generated from the reversed UML models.

Figure 9.6 - The reversed Class Diagram

If there is an active class diagram and you selected the "<DIAGRAM_NAME>" (Active Diagram) menu, the shapes of the reversed UML models will be generated and appended to the empty space of this diagram.

Reverse by Drag-and-Drop

In the Class Repository's Java Resources node, select the desired resources to be reversed, drag the selection over the target class diagram and then release the mouse button to drop it.

Figure 9.7 - Reverse by Drag and Drop

The shapes of the reversed UML models will be generated and placed to the location of this diagram where you dropped the resources.

Dynamic Link Library Instant Reverse

 Instant Reverse supports the reverse engineering of dynamic link library into UML class model.

Figure 9.8 - Dynamic Link Library file
To perform instant reverse of dll:

1. Select menu Tools > Instant Reverse > .NET dll or exe files... the Instant Reverse dialog box appears with the Dynamic Link Library Instant Reverse options for configuration.

Figure 9.9 - Open Instant Reverse dialog box

2. Type in the path of the Dynamic Link Library file. You may also select ... to select the file path. Then select OK to start.

Figure 9.10 - Specify the file path

3. A Message dialog box will appear telling you the reversal is successful.

Figure 9.11 - Message dialog box

4. An Instant Reverse form Diagram dialog box then appears. You can check the reversed classes and packages to form a new diagram. If you check the check box <default package>, you can form a diagram using the default package. You may also change the form diagram and presentation options. After selections have been made, click OK.

Figure 9.12 - Instant Reverse form Diagram dialog box

5. You can see the result of reversal in the Model pane.

Figure 9.13 - Model pane

6. You may also select one or more models and select Form Diagram > Customize.../Hierarchical/Navigation to form a new diagram.

Figure 9.14 - Select model to form diagram


7. The Form Diagram dialog box is shown. You can edit the details of the new diagram there.
Figure 9.15 - Form Diagram dialog box

  8.A new diagram is formed by the selected models.

Figure 9.16 - New diagram formed

XML Instant Reverse

Instant Reverse supports the reverse engineering of XML into UML class model. Every XML Node in the XML will be reversed as a class model. The attributes in node will be reversed as Class' attributes and all Class models will be reversed into a root package.

Figure 9.17 - XML file
To perform instant reverse of XML:

1. Select menu Tools > Instant Reverse > XML..., the Instant Reverse dialog box appears with the XML Instant Reverse options for configuration.

Figure 9.18 - Open Instant Reverse dialog box

2. Type in the path of the XML file. You may also select ... to select the file path. Then select OK to start.

Figure 9.19 - Specify the file path

3. A Message dialog box appears telling you the reversal is successful.

Figure 9.20 - Message dialog box

4. An Instant Reverse form Diagram dialog box then appears. You can check the reversed classes and packages to form a new diagram. If you check the check box <default package>, you can form a diagram using the default package. You may also change the form diagram and presentation options. Select OK.

Figure 9.21 - Instant Reverse form Diagram dialog box

5. You can see the result of reversal in the Model pane.

Figure 9.22 - Model pane

6. You may also select one or more models and select Form Diagram > Customize.../Hierarchical/Navigation to form a new diagram.

Figure 9.23 - Select model to form diagram

7. The Form Diagram dialog box is shown. You can edit the details of the new diagram there.
Figure 9.24 - Form Diagram dialog box

 8. A new diagram is formed by the selected models.

Figure 9.25 - New diagram formed

XML Schema Instant Reverse

VP-UML can reverse XML Schema into UML class model.

Figure 9.26 - XML schema file

1. Select Tools > Instant Reverse > XML Schema... from the main menu. The Instant Reverse dialog box appears with the XML Schema Instant Reverse options for configuration.

Figure 9.27 - Open Instant Reverse dialog box

2. Type in the path of the XML Schema file. You may also select ... to select the file path. Then select OK to start.

Figure 9.28 - Specify the file path

3. A Message dialog box appears telling you the reversal is successful.


Figure 9.29 - Message dialog box

4. An Instant Reverse form Diagram dialog box then appears. You can check the reversed classes and packages to form a new diagram. If you check the check box <default package>, you can form a diagram using the default package. You may also change the form diagram and presentation options. Then select OK.

Figure 9.30 - Select class or package to form diagram

5. You can see the reverse result in the Model pane, and expand the tree to see the what the models contain.
Figure 9.31 - Model pane showing result

6. You may also select one or more models and select Form Diagram > Customize.../Hierarchical/Navigation to form a new diagram.
Figure 9.32 - Select model to form diagram

7. The Form Diagram dialog box is shown. You can edit the details of the new diagram there.
 Figure 9.33 - Form Diagram dialog box

 8. A new diagram is formed with the selected models.
Figure 9.34 - Diagram formed

C++ Instant Reverse

VP-UML can reverse C++ into UML class model.

 Figure 9.35 - C++ file

To perform instant reverse of C++:

1. Select menu Tools > Instant Reverse > C++ Source..., the Instant Reverse dialog box appears with the C++ Instant Reverse options for configuration.


Figure 9.36 - Open Instant Reverse dialog box

2. Type in the path of the C++ file. You may also select ... to select the file path. You can select a folder or a C++ file, with the extension of .h or .cpp. Then select OK to start.


Figure 9.37 - Specify the file path

3. A Message dialog box appears telling you the reversal is successful.


Figure 9.38 - Message dialog box

4. An Instant Reverse form Diagram dialog box then appears. You can check the reversed classes and packages to form a new diagram. If you check the check box <default package>, you can form a diagram using the default package. You may also change the form diagram and presentation options. Then, select OK.


Figure 9.39 - Instant Reverse form Diagram dialog box

5. You can see the result of reversal in the Model pane.


Figure 9.40 - Model pane

6. You may also select one or more models and select Form Diagram > Customize.../Hierarchical/Navigation to form a new diagram.


Figure 9.41 - Select model to form diagram

7. The Form Diagram dialog box is shown. You can edit the details of the new diagram there.

Figure 9.42 - Form Diagram dialog box

8. A new diagram is formed with the selected models.


Figure 9.43 - New diagram formed

CORBA IDL Source Instant Reverse

VP-UML also supports reversing CORBA IDL Source into VP classes or models.


Figure 9.44 - CORBA IDL file

To perform instant reverse of CORBA IDL:

1. Select menu Tools > Instant Reverse > CORBA IDL Source..., the Instant Reverse dialog box appears with the CORBA IDL Instant Reverse options for configuration.


Figure 9.45 - Open Instant Reverse dialog box

2. Type in the path of the CORBA file. You may also select ... to select the file path. You can select a folder or a CORBA file. Then select OK to start.


Figure 9.46 - Specify the file path

3. A Message dialog box appears telling you the reversal is successful.


Figure 9.47 - Message dialog box

4. An Instant Reverse form Diagram dialog box then appears. You can check the reversed classes and packages to form a new diagram. If you check the check box <default package>, the diagram will follow the default package. You may also change the form diagram and presentation options. Then, select OK.


Figure 9.48 - Instant Reverse form Diagram dialog box

5. You can see the result of reversal in the Model pane.


Figure 9.49 - Model pane

6. You may also select one or more models and select Form Diagram > Customize.../Hierarchical/Navigation from the popup menu to form a new diagram.


Figure 9.50 - Select model to form diagram


7. The Form Diagram dialog box is shown. You can edit the details of the new diagram there.


Figure 9.51 - Form Diagram dialog box

 8. A new diagram is formed with the selected models.


Figure 9.52 - New diagram formed

PHP Instant Reverse

VP-UML can reverse PHP into UML class model.


Figure 9.53 - PHP file

To perform instant reverse of PHP:

1. Select menu Tools > Instant Reverse > PHP 5.0 Source..., the Instant Reverse dialog box appears with the XML Instant Reverse options for configuration.


Figure 9.54 - Open Instant Reverse dialog box

2. Type in the path of the PHP file. You may also select ... to select the file path. You can select a folder or a PHP file. Then select OK to start.


Figure 9.55 - Specify the file path

3. A Message dialog box appears telling you the reversal is successful.


Figure 9.56 - Message dialog box

4. An Instant Reverse form Diagram dialog box then appears. You can check the reversed classes and packages to form a new diagram. If you check the check box <default package>, the diagram will follow the default package. You may also change the form diagram and presentation options. Then, select OK.


Figure 9.57 - Instant Reverse form Diagram dialog box

5. You can see the result of reversal in the Model pane.


Figure 9.58 - Model pane

6. You may also select one or more models and select Form Diagram > Customize.../Hierarchical/Navigation to form a new diagram.


Figure 9.59 - Select model to form diagram

7. The Form Diagram dialog box is shown. You can edit the details of the new diagram there.


Figure 9.60 - Form Diagram dialog box

 8. A new diagram is formed with the selected models.


Figure 9.61 - New diagram formed

Hibernate Instant Reverse

In VP-UML, you can generate VP classes and models by converting Hibernate code.
Figure 9.62 - Hibernate file

To perform instant reverse of Hibernate:

1. Select menu Tools > Instant Reverse > Ada 9x Source..., the Instant Reverse dialog box appears with the Ada 9x Instant Reverse options for configuration.


Figure 9.63 - Open Instant Reverse dialog box

2. Type in the path of the Hibernate file. You may also select ... to select the file path. You can select a folder or a Hibernate file. Then select OK to start.


Figure 9.64 - Specify the file path

3. A Message dialog box appears telling you the reversal is successful.


Figure 9.65 - Message dialog box

4. An Instant Reverse form Diagram dialog box then appears. You can check the reversed classes and packages to form a new diagram. If you check the check box <default package>, the diagram will follow the default package. You may also change the form diagram and presentation options. Then, select OK.


Figure 9.66 - Instant Reverse form Diagram dialog box

5. You can see the result of reversing in the Model pane.


Figure 9.67 - Model pane

6. You may also select one or more models and select Form Diagram > Customize.../Hierarchical/Navigation from the popup menu to form a new diagram.


Figure 9.68 - Select model to form diagram

7. The Form Diagram dialog box is shown. You can edit the details of the new diagram there.


Figure 9.69 - Form Diagram dialog box

 8. A new diagram is formed by the selected models.


Figure 9.70 - New diagram formed

JDBC Instant Reverse

You can reverse database into VP classes and models via JDBC.

To perform instant reverse of JDBC:

1. Select menu Tools > Instant Reverse > Ada 9x Source..., the Instant Reverse dialog box appears with the Ada 9x Instant Reverse options for configuration.


Figure 9.71 - Open Instant Reverse dialog box

2. Configure the JDBC Setting. You can select or type in the path of the driver in the JDBC Driver. Then select the JDBC Driver Name from the dropdown menu.
Figure 9.72 - Select the Driver Name

3. The JDBC Driver Class is automatically generated. You may also configure the driver class yourself.
Figure 9.73 - Driver class is generated automatically

4. Configure the JDBC Connection URL, User and Password. Then select OK.
Figure 9.74 - Configure connection URL, user and password

5. A Message dialog box appears telling you the reversal is successful.


Figure 9.75 - Message dialog box



6. An Instant Reverse form Diagram dialog box then appears. You can check the reversed classes and packages to form a new diagram. If you check the check box <default package>, the diagram will follow the default package. You may also change the form diagram and presentation options. Then, select OK.
Figure 9.76 - Instant Reverse form Diagram dialog box

7. You can see the result of reversing in the Model pane.
Figure 9.77 - Model pane

8. You may also select one or more models and select Form Diagram > Customize.../Hierarchical/Navigation from the popup menu to form a new diagram.


Figure 9.78 - Select model to form diagram


9. The Form Diagram dialog box is shown. You can edit the details of the new diagram there.

Figure 9.79 - Form Diagram dialog box

10. A new diagram is formed by the selected models.


Figure 9.80 - New diagram formed

Ada 9x Instant Reverse

VP-UML also supports reversing Ada 9x code into VP classes or models.


Figure 9.81 - Ada 9X file

To perform instant reverse of Ada 9x:

1. Select menu Tools > Instant Reverse > Ada 9x Source..., the Instant Reverse dialog box appears with the Ada 9x Instant Reverse options for configuration.


Figure 9.82 - Open Instant Reverse dialog box

2. Type in the path of the Ada 9x file. You may also select ... to select the file path. You can select a folder or an Ada 9x file. Then select OK to start.


Figure 9.83 - Specify the file path

3. A Message dialog box appears telling you the reversal is successful.


Figure 9.84 - Message dialog box

4. An Instant Reverse form Diagram dialog box then appears. You can check the reversed classes and packages to form a new diagram. If you check the check box <default package>, the diagram will follow the default package. You may also change the form diagram and presentation options. Then, select OK.


Figure 9.85 - Instant Reverse form Diagram dialog box

5. You can see the result of reversing in the Model pane.


Figure 9.86 - Model pane

6. You may also select one or more models and select Form Diagram > Customize.../Hierarchical/Navigation from the popup menu to form a new diagram.


Figure 9.87 - Select model to form diagram

7. The Form Diagram dialog box is shown. You can edit the details of the new diagram there.


Figure 9.88 - Form Diagram dialog box

8. A new diagram is formed by the selected models.


Figure 9.89 - New diagram formed


Objective-C Instant Reverse

VP-UML also supports reversing Objective-C code into VP classes or models.

 


Figure 9.90 - Objective-C file

To perform instant reverse of Ada 9x:

1. Select menu Tools > Instant Reverse > Ada 9x Source..., the Instant Reverse dialog box appears with the Ada 9x Instant Reverse options for configuration.


Figure 9.91 - Open Instant Reverse dialog box

2. Type in the path of the Ada 9x file. You may also select ... to select the file path. You can select a folder or an Ada 9x file. Then select OK to start.


Figure 9.92 - Specify the file path

3. A Message dialog box appears telling you the reversal is successful.


Figure 9.93 - Message dialog box

4. An Instant Reverse form Diagram dialog box then appears. You can check the reversed classes and packages to form a new diagram. If you check the check box <default package>, the diagram will follow the default package. You may also change the form diagram and presentation options. Then, select OK.


Figure 9.94 - Instant Reverse form Diagram dialog box

5. You can see the result of reversing in the Model pane.


Figure 9.95 - Model pane

6. You may also select one or more models and select Form Diagram > Customize.../Hierarchical/Navigation from the popup menu to form a new diagram.


Figure 9.96 - Select model to form diagram

7. The Form Diagram dialog box is shown. You can edit the details of the new diagram there.


Figure 9.97 - Form Diagram dialog box

8. A new diagram is formed by the selected models.


Figure 9.98 - New diagram formed


Previous Next
Visual Paradigm International Limited
Website: www.visual-paradigm.com
E-mail: support@visual-paradigm.com