Round-trip engineering with Eclipse Integration

You can update code and UML model with Eclipse Integration. In this article, you can learn how to update Eclipse in VP-UML and then how to update to UML model from Eclipse.


1. Start VP-UML.
2. In VP-UML, select Tools > IDE Integration from the main menu.

Launch IDE Integration

Launch IDE Integration

3. In the pop-up VP-UML IDE Integration dialog box, check Eclipse Integration and then click Next button.

 

Check Eclipse Integration

Check Eclipse Integration

4. Select Eclipse’s directory and then click Next button.

 

Select Eclipse directory

Select Eclipse directory

5. After the installation is completed, you can close VP-UML.
6. Execute Eclipse by double clicking eclipse.exe in Eclipse folder.

 

Execute Eclipse

Execute Eclipse

7. In Java-Eclipse dialog box, create a new Java project by selecting File > New > Java Project from the main menu.

 

Open new project

Open new project

8. When New Java Project dialog box pops out, enter project name as BankAccount. Click Finish button to proceed.

 

Enter project name

Enter project name

9. To trigger a new VP-UML project, right click on BankAccount project node and select VP-UML > New VP-UML Project from the pop-up menu.

 

Trigger new VP-UML project

Trigger new VP-UML project

10. Let’s create a class diagram as follows in VP-UML.

 

Draw class diagram

Draw class diagram

11. Now, synchronize the class diagram to Eclipse. Click Update Eclipse on Diagram Navigator.

 

Update Eclipse

Update Eclipse

12. Go back to Eclipse. In Package Explorer tab, unfold BankAccount > src and you can find all Java codes under BankAccount project node.

 

All Java codes are listed

All Java codes are listed

13. Double click User.java to open it on the pane. Let’s edit its code. Add name and id attributes. After that, you can update the changes back to model.

 

Edit code

Edit code

14. Right click on the background of the java code editor and select Update VP-UML Model from the pop-up menu.

 

Update to VP-UML model

Update to VP-UML model

15. Finally, the class diagram has been updated. You can see the name and id attributes are created in User class.

 

Updated User class

Updated User class

Related Articles

1528 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply