Using the OCLEditor with UML2 Profiles

It is also possible creating OCL expressions on UML2 Profiles. In this section you will create an OCL project at this level.

  1. create a new OCL Library project with the OCL Project wizard.
  2. create a new OCL Library inside this project
  3. add your profile to the  folder , which contains the user models. By default it's the "models" folder inside the project. Please take care, that the profile has to have the file extension ".profile.uml" in order to be well recognized by the environment.

New OCL Library Project wizard

The model file framed with a red rectangle is the UML2 Profile. The model framed with the blue one, is the user model.

 

Now, the UML2 Profile can be used in the OCL Library. Referencing elements of the Profile can be done by typing "Profilename::ProfileElement", framed in red in the next image.

New OCL Library Project wizard

New OCL Library Project Wizard