Use new Stereotype inside a Class Diagram



In this section you will be able to add the new stereotype previously created using the UML Profile Diagram inside your class diagram respecting new UML 2 specifications. The profile mechanism is working at project level using the Eclipse project properties.

 

Select the project (e.g. tutorial) in the package explorer, open the popup menu > Properties.


 

Select UML Profiles in the left pane and click on the Add button.


 

Select the UML2 profile which has been previously created in the profile folder.


 

The new profile (i.e. profile) is activated as soon as we click on the OK button.


 

We now need to check that the profile has been applied inside the tutorial project. We open our existing class diagram by double clicking on the class diagram (e.g. tutorial-i.ucd).


 

The class diagram editor appears, including the Employee class which has been previously created. Left click on Employee > open the popup menu > Properties.


 

Click on the New Stereotype button.


 

We can now add the stereotype named MyStereotype which is available in the drop down list. Select MyStereotype using the down arrow.


 

The stereotype appears in the class properties dialog. Note that you can set a value to the stereotype attributes.


 

The stereotype is now applied to the Employee class.

 

We have successfully created our own new stereotype and applied it to a class. Note that this stereotype may be applied to attributes, methods, associations and interfaces.



 
Last update Mon Feb 02 15:44:02 CEST 2005 Valid XHTML 1.0 Valid CSS All text, graphics © 2002-2005 by Omondo