EclipseUML User Guide > Persistence  Development

Activate EclipseUML in the JPA Perspective

EclipseUML 2008 could be directly activated inside the JPA Perspective.
This section is about:
  1. How to activate the JPA Perspective
  2. How to create a Class diagram
  3. How to activate the Class Diagram Persistence Development
We recommend using Dali and JPA Perspective with EclipseUML, and not only the modeling perspective, in order to take the full advantage of the tight UML integration within Eclipse with JPA.
For example, the reverse of existing Database is gerated by Dali, then EclipseUML upload all information in the class diagram. It allows to extend the model and generate metamodel + Java Annotation in the code. Finally powerfull mappers such as toplink or Hibernate can generate code for Oracle, MySQL etc...

1. To activate the JPA perspective you need to click on the Open Perspective icon in the upper right corner of Eclipse.

Select Other...

Select JPA Development

2. Immediately after the click on the OK button, Eclipse switch to JPA Perspective.
Go in the Package Explorer and create a JPA project, then add a package to your src in order to activate the class diagram creation.
You can not create class diagram if you don't create a package.

Click on the package and select New UML Diagram > UML Class Diagram

You Class Diagram has been created inside the JPA Perspective.

3. In order to activate the Database preferences inside EclipseUML, click on the class diagram backgorund and select Persistence Development > JPA.

Once the JPA menu is selected, the JPA toolbar is immediately activated in the Class diagram

And the class diagram contextual menu New > JPA is now available.