Share via


How to: Add a Connector (DSL Explorer)

You can use connectors to represent how domain relationships appear in the generated designer (for example, what color and dash style that the line will display). For more information, see Connector (Domain-Specific Language Designer).

After you define the connector and set its properties, you can map the connector to the domain relationship (embedding relationship or reference relationship). You can perform this task by using either the Diagram Element Map tool or the Diagram node in DSL Explorer. For more information, see How to: Map Elements By Using the Diagram Element Map Tool or How to: Add a Connector Map (DSL Explorer). Next, you can create a ConnectionTool item for the Toolbox by using the DSL Explorer. For more information, see How to: Add a Connection Tool.

To add a connector to a domain-specific language definition by using DSL Explorer, use the steps in the following procedure.

To add a connector using DSL Explorer

  1. In DSL Explorer, right-click the Dsl node, and click Add New Connector.

    A connector that is named Connector1 appears in the designer definition under the Diagram Elements swimlane.

  2. Optionally, add decorators, such as text and an icon, to the connector. For more information, see How to: Add a Decorator.

  3. Optionally, add domain properties to the connector. For more information, see How to: Add a Domain Property.

  4. In the Properties window, set any properties.

    For example, you can change the default value of the Color property from black to red and the DashStyle property from solid to dash.

See Also

Concepts

Domain-Specific Language Designer Terminology Overview

Walkthrough: Creating a Domain-Specific Language Solution

Defining Diagram Elements

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

Domain-Specific Language Tools Glossary