You can apply the stereotypes
in the UML-to-Java transformation profile
to validate source model elements, or to control how the UML-to-Java transformation
generates Java source code.
Before you begin
You must have a UML model open
in the Modeling perspective.
About this task
Important: Do not apply the
UML-to-Java (deprecated) transformation profile
to a source model. Instead, you should apply the
UML-to-Java transformation profile.
The deprecated
profile does not contain new
stereotypes, and the validation rules are different for stereotypes
with the same name as the stereotypes in the UML-to-Java transformation profile. The only time that you might apply
the deprecated profile is if you migrate a UML model from a version
6 release of IBM® Rational® modeling products,
and want to validate the source model automatically, using an older
set of validation rules.
After
you apply the profile to the source model, you can apply specific
stereotypes to validate source model elements. The stereotypes that
affect how the transformation generates Java code
are applied automatically when you run the UML-to-Java transformation.
To
apply the UML-to-Java transformation profile
to a source model:
Procedure
- In the Project
Explorer view, double-click a model or a package in a model.
- In the Properties view,
on the Profiles page, click Add Profile.
- In the Select
Profile dialog box, click Deployed Profile.
- From the Deployed Profile list,
select Java Transformation.
- Click OK.
- Click .