Feature activation

This paragraph deals with the Java project setting for using eUML2 Modeler with JDK 1.5 features. There are two issues: Java project setting and eUML2 Modeler JDK 1.5 features activation.

For a Java project, these features can be enabled only if the project is well configured for JDK 1.5 regardless of the eUML2 Modeler configuration.

  1. Using JDK 1.5 libraries
  2. Java compiler setting
  3. UML project migration
  4. New UML project configuration

1. Using JDK 1.5 libraries

If your project uses the old JDK libraries, please read JDT documentation: “Java Development User Guide” to change it.

2. Java compiler setting

The Java Compilation for the project must be set up for JDK 1.5 compliance via the project property dialog (right click on the project and select the menu “Properties”).

If the option “Enable project specific settings” is not enabled for this project, the global preference setting of JDT will be used:

If both the above conditions are satisfied, the JDK 1.5 features are automatically activated in a UML project. It is possible to use JDK libraries without JDK 1.5 features in UML, so it is up to the user to enable them.

To understand the activation actions, it is necessary to understand the project states and their transition. In the eUML2 Modeler context, there are 4 states:

State of Java project

Description

Old JDK

Pure Java project setup with old JDK libraries or compilation compliance

Old JDK with UML

Project has the same Java settings as State 1 but is also configured with UML

JDK 1.5 Pure Java project setup with JDK 1.5 libraries and compilation compliance
JDK 1.5 with UML Project has the same Java settings as State 3 but is also configured with UML

 

The two situations in which you activate JDK 1.5 features are:

3. UML project migration

The migration concerns a UML project based on old JDK to JDK 1.5.

To perform this action, select a project in the Package Explorer, right click on the project and then select the menu eUML2 > Activate JDK 1.5 features.

This menu is enabled when the project is JDK 1.5 compliant and it has UML settings. Without this action, eUML2 Modeler keeps the same behavior as the previous version without the new JDK 1.5 features.

4 New UML project configuration

The main task of new UML project configuration is UML reverse engineering. A new option is introduced to activate the JDK features.

Right click on the project and select the menu eUML2> Reverse engineering to get the configuration dialog box below.

Once one of the two actions has been performed, a new library container named “UML” is installed. Afterwards, a new icon tool of enumeration will be shown in the tool bar of class diagram and the appropriate context menus will be accessible for diagram, package, class and interface to insert and create an enumeration.

 

 

This activation changes also the behavior of our code generator to generate the Generic type syntax of collections such java.util.Collection, java.util.Map and their sub-types or implementations.

Once theses features are enabled, eUML2 Modeler doesn’t provide any rollback solutions except the option to remove all UML artifacts in the project via the context menu clean.

 

© Soyatec 2002-2004. All Rights Reserved.