Adding custom properties to capsule-based UML models

You can add a group that contains custom properties for elements to a capsule-based UML model. The new group of customized properties is displayed in the Properties view, on the RT Properties page, for the elements to which the property set applies.

Before you begin

Restriction: For all new «Set» stereotypes, the combination of the group name and element type must be unique, so you cannot add custom properties to an existing group.

About this task

To add a custom group of properties:

Procedure

  1. Create a new profile.
  2. Apply the PropertySet profile to the new profile.
  3. Apply the PropertyProfile stereotype to the new profiles.
  4. For the PropertyProfile stereotype, set the value of the category attribute to the domain of the group of properties.
  5. Create a stereotype. The Set stereotype is automatically applied to the newly created stereotype.
  6. Add an extension to the appropriate metaclass, and also to the metaclass named Package.
  7. Add attributes to the stereotype for the custom properties; for each attribute that is created, define a type and a default value.
  8. For the Set stereotype, set the category and subcategory attributes to the appropriate type and group name for the property set.
  9. Repeats steps 5-8 for each custom group to add.
  10. Apply the new profile to a model to make its property sets available to that model.

Example

For example, the following figure shows a property profile for the C++ domain that defines a new group called “Custom” for classes that contains a Boolean property called “finished”, and a new group called “Extras” for capsules that contains a string property called “Author”.
Note: To define a new enumerated type for a custom property, create an enumeration element in an extended profile, and use it as the type of the property.

Feedback