Defining Tracking Properties

A tracking domain property is a property that can be updated by the user but which has a default value that is calculated by using the values of other domain properties or elements.

For example, in the Domain-Specific Language Tools (DSL Tools), the Display Name property of a domain class has a default value that is calculated by using the name of the domain class, but a user can change the value at design time or reset it to the calculated value.

Features of Tracking Properties

A tracking property has two states: tracking, and updated by the user. Tracking properties have the following features:

  • When in the tracking state, the value of the tracking property is calculated, and the value is updated as other properties in the model change.

  • When in the updated by user state, the value of the tracking property retains the value to which the user last set the property.

  • In the Properties window, the Reset command for the tracking property is only enabled when the property is in the updated by user state. The Reset command sets the tracking property state to tracking.

  • In the Properties window, when the tracking property is in the tracking state, its value is displayed in a regular font.

  • In the Properties window, when the tracking property is in the updated by user state, its value is displayed in a bold font.

Adding Tracking Properties

To set up a tracking domain property, in the Properties window, set the Kind property to Custom Storage. You must then add custom code to implement the property. For more information about how to implement a tracking property, see Walkthrough: Adding a Tracking Property to a Domain-Specific Language Definition.

See Also

Tasks

Walkthrough: Adding a Tracking Property to a Domain-Specific Language Definition

Change History

Date

History

Reason

July 2008

Added topic.

Content bug fix.