EclipseUML 2008 dynamic navigation

A set of UML diagrams forms a model that may be compared to an architect's blueprint. Unfortunately, we usually know how to save a model from a graphical blueprint but we don't know how to create a detailed blueprint from a model. This is like having thousands of pieces of information in your model but just being able to see it in a project explorer and getting a static blueprint without understanding the elements' interactions. Omondo is the only tool which allows you to see dynamic blueprints in a diagram (e.g without transformation which is unreliable). If you have an existing model coming from Eclipse Modeling Tools where models are split in many small models, please have a look at the model merge option.

You can also natively merge multiple projects models without any compatibility problem, even if models are coming from different tools vendors. This is done at the XMI native level and so no transformation is needed and therefore no information is lost. We even keep each UML Id from previous models.
We will provide below an example of interoperability of the RSA 7 model created by Eclipse 3.2 within EclipseUML 3.4 Ganymede.
Model interchange is now a reality using the latest official UML 2.2 OMG specifications and EclipseUML 2008.

In this section Omondo will explain how to create dynamic multiple graphical views just from a model.

The following areas are covered:

  1. Requirements
  2. Create your project and copy the model
  3. Rename the .uml file and upload your model
  4. Navigate inside the Xerces superstructure Model
  5. Model interchange between RSA 7 and EclipseUML

1. Requirements

You need to download:

2. Create your project and copy the model

Click in the Package Explorer > New > Project then Enter the name of the project (e.g. Model_Dynamic_Nagigation) in the Project Name Field.



Click on the Xerces UML 2.2 model that you have downloaded and extract it into your workspace.



Select the root of your project (e.g. Model_Dynamic_Navigation).



If you don't immediately see the xerces_model.uml file in your Package Explorer, then just click on your project > refresh



You can notice that you have two model files (e.g. the .uml file) at the root of the project.
Each project automaticly creates a model file having the same name (e.g. Model_Dynamic_Navigation.uml) which is the model.
This model is loaded in memory when you first time launch a new Eclipse session.
We also have the file xerces_model.uml which the model that we have pasted.


3. Rename the .uml file and upload your model

Delete the Model_Dynamic_Navigation file from your Package Explorer.



Now rename the model xerces_model.uml in order to have the same name as the project.
It is important to have the same name (e.g. project and .uml model) because the project and the model are loaded in memory at Eclipse session start.

Click on the .uml  file > Refactor > Rename



Enter the name of your model (e.g. same name as your project) and click on the OK button.



You should now have the following Package Explorer.

Don't forget that model and the project are instantiated at the Eclipse start.
We therefore now need to switch off Eclipse and restart it again.

Select the Close and Open - Repair All Diagrams menu in the toolbar




4. Navigate inside the Xerces superstructure Model

To navigate in the model you can either use the Xmi Editor or the UML editor.
Click on the Model_Dynamic_Navigation.uml file > Open With > Omondo XMI 2.1 Editor



If you open the XMI editor then you will see that packages, nested packages and classifiers have been created in the model including all project information.



Now we are going to use the UML editor to visualize these classifiers in a class diagram.

First how to create a package: Click in the Package Explorer and selet src > New > Package.
Enter the name of the Package (e.g. myDiagrams).
Then how to create a diagram and gives a name to this diagram: Click on the package (e.g. my Diagrams package in the Package Explorer) and create your class diagram by selecting myDiagrams package > New UML Diagram > UML Class Diagram and click on the finish buton.

Enter the name of your diagram in the File name field (e.g. events_package_view).




Select classifiers from the XMI editor using the mouse and Drag and drop them inside your class diagram.




The diagram is not really visible because it contains too many information.
We need to dynamically create the needed view by hiding:
  • property and operation compartments
  • package information

Click on the diagram background (e.g. be sure not to have selected any element) Show/Hide > Show/Hide Compartments > All Compartments




Remove the package information from your diagram by selecting the diagram background > Package Information > No indication




For example if we want to see inheritances view we need to show all inheritances included in this diagram and layout classiers with connectors.
Select the diagram background inheritance > Show all Inheritence > manual



Arrange all the diagram to have a clear view by selecting the diagram background > Arrange Diagram > Arrange All
Below is the new inheritance view.



Dynamic navigation means that you can change a diagram into another view.
You don't need to save your diagram and then create a new diagram.
The recommended option is to navigate inside the model using contextual menus.

For example let's now have a dependencies view diagram.
We therefore need to hide inheritance show dependencies and layout all classifiers and connectors.

Select the diagram contextual menu Inheritance > Hide All Inheritance and then Dependencies > show All dependencies > Manual
Below is the dependencies view.



You can also navigate and see each classifier interaction by clicking on the Classifier contextual menu.
Below is the autodetected model dependencies contextual menu related to MouseEvent interface.
Note that this information is only coming from the model because the project has no java elements.




5. Model interchange wiht RSA 7

Use the same method to past and copy the model .uml file (more info see section 2) inside an Eclipse project and load the RSA 7 model inside Eclipse 3.4. Note that the RSA model has been created using Eclipse 3.2 and is composed by:
After the model has been created inside the Eclipse Ganymede project open this model by selecting the .uml file in your package explorer > Open With > Omondo XMI 2.1 Editor



Select elements directly in the model and drag and drop inside the newly created diagram (See drag and drop).
You will create the following diagrams inside EclipseUML 2008:

Class diagram


UseCase diagram

StateChart diagram


Activity diagram





Conclusion:

EclipseUML 2008 allows you to:
  • rebuild dynamically graphical views from your model.
  • dynamically navigate inside your model using the UML editor.
  • natively (e.g. no transformation needed) interchange models with other tools.




PS: We have reversed the Xerces project and have immediately mapped all project information from Java to UML 2.2.
To create a .uml file (e.g. your model) from your java code you need to:
  1. Import Xerces code inside your Eclipse
  2. Click on the src > Open Reverse UML > Deep Reverse / Merge Model
This deep reverse will analyse all your java project and detect inheritance, association and dependencies at project level (e.g. classifiers having inheritance in another project will be detected. For example Interfaces will map with classes even if not in the same package).
Please note that because of the heavy job to do the deep reverse will require in order to map a 1 000 classes java project to UML superstructure about 15 minutes.