To be included in a project as a property extending a UML element, an attribute must be owned by a DSL customization element and stereotyped as «derivedPropertySpecification».
To create and specify a derived property
Select the customization element for which you want to create a derived property.
The derived property will be created for the stereotype or metaclass, defined as a customization target in the selected customization element specification. |
Select Create Element > Derived Property Specification from the shortcut menu. The attribute is created.
Type the attribute name. Your Model Browser should look like this at this stage:
The attribute’s name corresponds to the name of the derived property. Type derived property names in camel case (i.e.,realizingActivities). A property name defined in camel case will be displayed in separate words with the first word capitalized. For example, realizingActivities will be changed to Realizing Activities (visible in the user interface). |
Edit property values specifying the derived property in the attribute's Specification window.
All properties are specified in the general specification pane. Some are also specified in the Tags specification pane. For detailed information, see the properties description table. |
If you do not see the newly created derived property in the element’s Specification window, please read the following:
|
If you need to further customize a customization’s derived property without modifying the existing customization itself, you can create a new customization that can inherit the former one’s properties via a generalization. Then you can redefine the inherited derived property to customize it. The redefining derived property of the new customization overrides that of the original customization. |
The following table describes the properties specified for the derived property.
Property | Description | |
---|---|---|
Name | The name of the property. | |
Type | The type of the derived property values. You may set a model element type or a data type (e.g., string, boolean, orintegerfrom the UML Standard Profile) as a property value.
| |
Multiplicity | The multiplicity of the derived property values.
| |
Is Read Only | If true, the derived property is read-only. You cannot edit the result elements for the derived property value. | |
Is Ordered | If true, the property values are always displayed in the same order. | |
Is Unique | If true, the property values are unique. The same element is displayed only once. | |
Expression | One or more expressions of the derived property. There are ten possible expression types:
The criterion for selecting the result elements can also be any combination of the expression types above.
| |
Documentation | The text displayed as the derived property description in the element’s Specification window and Properties panel. | |
customizationTarget | The specified derived property will be added to one or more element types (stereotypes and/ or metaclasses).
|
Related pages: