UML Model Reverse Engineering

UML model reverse engineering is a complex processus.It provides not only a byte-code reverse engineering engine, but also an migration capability from Free edition to Personal/Professional/Studio editions. In terms of data flow, it read from :

And finally, the results are stored back as annotation into Java sources.

The Reverse engineering processus consists of three steps:

  1. Setup preferences
  2. Launch Reverse Engineering
  3. Select model sources

1. Setup Preferences

First, it is very important to set up some Preferences in Eclipse:

These preferences influence the Reverse engineering results.

2. Launch Reverse Engineering

There are two ways to invoke UML Model reverse engineering:

  1. Automatical Reverse Engineering
  2. Explicit Reverse Engineering

2.1 Automatical Reverse Engineering

When you create the first diagram in a Java project, the Reverse Engineering is started automatically. There are two possibilities to create a class diagram: using UML new wizard or calling short cut menu.For the second solution, you need select one package in the Package explorer and right click on the mouse to call the context menu eUML2 > Class diagram editor... as following:


2.2 Explicit Reverse Engineering

It is also possible to perform the Reverse Engineering whenever you want by selecting the Java Project in Package explorer and then right click to call the contexte menu: eUML2>Reverse engineering:

3. Model Source Options

The Reverse Engineering has different options if the Java project contains already UML models from eUML2 free edition.

3.1 Reverse engineering without migration

If the Java project has never touched by eUML2 free edition, when you Reverse engineering is activated, you will get following option dialog.
If you already have existing UML annotations in your project, you will be able to ignore them by selecting the "Ignore existing UML annotation" checkbox.
This checkbox will not appear if the project doesn't have UML annotation,.

It is possible to change some options to select the model sources.

3.2 Reverse with migration

If the project contains the UML repository created within eUML2 free edition, a warning dialog will alarm that the Reverse engineering is irreversible.

If you confirm the operation, you will get following option dialog: