How to: Define Compartment Settings of Diagram Element Maps

You can map individual compartments in a compartment shape to display properties that you specify by using the DSL Details window, as described in the following procedure.

You can find an example of a compartment shape in the Class Diagram sample. For more information, see Class Diagram Sample.

To define mapping details for compartments

  1. In the Domain-Specific Language Designer, locate the compartment shape that contains the individual compartments for which you want to define maps.

  2. Click the mapping line between the compartment shape and the domain class.

    In the DSL Details window, the Mapping Details channel appears.

    注意

    If you cannot see the DSL Details window, click DSL Details on the DSL Designer toolbar.

  3. In the Mapping Details channel, click the Compartment Maps tab.

  4. In the Compartments list, select the compartment that you want to map.

    In the Displayed elements collection path box, click to show a tree view of the displayed elements collection. For more information about domain paths, see Overview of Domain Relationships and Overview of Domain Path Syntax.

  5. (Optional) Select Use custom element collection if you expect to write custom code to provide a list of items in the compartment.

  6. In the Path to display property box, type the path of the display property that designates what you want to display. For more information, see Overview of Domain Path Syntax.

  7. In the Display property list, select the display property that specifies the text for the line item in the compartment.

See Also

Concepts

Defining Element Mapping Details

How to: Add a Compartment Shape to a Domain-Specific Language Definition

Compartment Shape (Domain-Specific Language Designer)

Domain-Specific Language Tools Glossary