Visual Paradigm for UML 2.0 |
VPUML can reverse the code from the Code Pane to update a class in a class diagram.
1. Open a class diagram in the Project Explorer. The class diagram is shown.
2. Right click on the diagram. A popup menu appears.
3. Click on Show Code Pane in the popup menu.
4. The Code Pane is shown. Click on the class diagram again. A popup menu appears.
5. Click on Real Time Code Generation on the popup menu.
6. Click on a class in the class diagram. The code for the class is generated.
7. Add an attribute in the Code Pane. The class in the class diagram will be updated with the attribute added.
8. Add an operation in the Code Pane. The class in the class diagram will be updated with the operation added.
VPUML can reverse Java files to class models. The class models can then be added to class diagram.
1.
Click on Code in the menu bar. The Code
menu appears.
2. Click on Java on the menu. A cascading menu appears.
3. Click Option in the cascading menu. The Code Engine Set Configuration dialog appears. Click on the Code Generation tab in the dialog.
4. Input the working directory in the Working Directory text field.
5.
Or click on the button. The Open dialog appears.
6. Select a directory in the dialog. The working directory is set.
7. Click on the Code Reverse Engineering tab in the dialog. The Source Paths and Classpaths are updated. (The source paths are the path containing the Java files to be reserved. The class paths are the path containing the class files to be referenced. To add more source path and class path, click on the Add¡K button.)
8. Check the Lock for classes in classpath for reserving the class name fully qualified. (e.g. String => java.lang.String). Check the Merge mode and code for updating the already existing class in class diagram from code.
9. Click on the OK button in the dialog. The dialog is closed.
10. Click Code in the menu bar. The Code menu appears.
11. Click Java in the menu. A cascading menu appears.
12. Click on Reverse on the cascading menu. The Code reserve engineering dialog appears to show the progress. The Java files in the source path will be reserved to class models.
13. When the progress reaches 100%, click on Close in the dialog. The class models are added in the Model Tree.
14.
Click the refresh button to refresh the Model Tree.
15. Right click on the root directory in the Tree Model. A popup menu appears.
16. Click on Collapse All to collapse the tree to see all the class models generated.
1. Click on File on the menu bar. The File menu appears.
2. Click on New Diagram in the menu. A cascading menu appears.
3. Click on New Class Diagram / New Class Diagram with Real Time Code Generation in the cascading menu.
4. Drag the class models from the Model Tree to the new class diagram. The class models reserved from the Java files will be added to the class diagram.
1. To update a class model from the Java file, right click on the class. A popup menu appears.
2. Click on Reverse code on the popup menu. The Code Reserve Engineering Options dialog appears.
3. Click on the OK button in the dialog. The Code reverse engineering dialog appears to show the progress.
4. When the progress reaches 100%, click on Close in the dialog. The class model and the class in the class diagram will be updated.
First | Previous | Next | Last |
Patents pending. All rights reserved. |