Transform to Java and keep the same UML ID


This is only a EclipseUML 2008 feature.
This feature is available at classifiers and diagram level.
The following example will explain how this Transform to Java feature works and why it is important.

Create a UML Class by selecting the Class diagram background > New > Class > UML Class




We have created two UML classes using the same  UML Class menu. 
If you look at the Package Explorer you don't see any Java Classes in this Java Project and 2 Classes in the XMI Editor.




We are now going to transform this two classes into Java Classes by using the Select All (e.g. mouse background click and then Ctrl+A) then select Transform to Java



Here are the two newly created classes in the Package Explorer and the model.



What is important in this example is to be able to model inside a Java Project and not to create any classes at this modeling stage.
Then to be able to create the skeleton of your application inside Java at the implementation stage.
EclipseUML keeps the model logic by keeping the same model element during this transformation stage.
If you use traditional code generation tool then the generated code and the model are not anymore the same and the modeling logic is broken.
It means that iterative modeling using Model Driven approach is only possible if using the "Same Model Id" feature at code generation.
Code generation without model merge is a serious limitation in a modern MDD approach.