Share via


How to: Add a Domain Class to a Domain-Specific Language Definition

You add and define domain classes in a domain-specific language definition to represent classes in a domain-specific language. For more information about domain classes, see Domain Class and Named Domain Class (Domain-Specific Language Designer).

After you add domain classes to your domain-specific language definition, you might want to establish relationships among them. For more information, see How to: Add an Embedding Relationship to a Domain-Specific Language Definition, How to: Add a Reference Relationship to a Domain-Specific Language Definition and How to: Add Inheritance to a Definition. You might also need to map the domain class to a shape, such as a geometry or image shape, to establish how the domain class will appear in the generated designer. For more information, see Defining Diagram Elements and How to: Map Elements By Using the Diagram Element Map Tool.

To add a domain class to a domain-specific language definition

  1. Drag a domain class from the Dsl Designer tab of the Toolbox to the diagram surface of the Domain-Specific Language Designer.

    A domain class named DomainClass1 is created in the Classes and Relationships swimlane.

  2. If appropriate, add domain properties to the domain class. For more information, see How to: Add a Domain Property.

  3. In the Properties window, set the properties for the domain class. For more information, see Domain Class and Named Domain Class (Domain-Specific Language Designer).

    Note

    You can also add a named domain class, which is a domain class that has a name property, by using the Named Domain Class item in the Toolbox. For more information, see How to: Add a Named Domain Class to a Domain-Specific Language Definition.

See Also

Concepts

Defining Classes and Relationships

Domain-Specific Language Designer Terminology Overview

Walkthrough: Creating a Domain-Specific Language Solution

How to: Add a Domain Class (DSL Explorer)