Share via


How to: Add a Swimlane (DSL Explorer)

You can use swimlanes to create horizontal or vertical lines that designate defined areas in the diagram for a generated designer. You can also define other shapes that are bound to swimlanes. For more information, see Swimlane (Domain-Specific Language Designer).

The Task Flow Diagram sample demonstrates the use of a swimlane. For more information, see Task Flow Diagram Sample.

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

To add a swimlane using DSL Explorer

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

    A swimlane that is named Swimlane1 appears in the Diagram Elements swimlane.

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

  3. Optionally, add domain properties to the swimlane. 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 Separator Color property from dash to solid and the Alignment property from vertical to horizontal.

    After you create and customize the swimlane, you must then map it to a domain class by using the Diagram Element Map tool or the Diagram node in DSL Explorer. For more information, see How to: Add a Domain Class to a Domain-Specific Language Definition, How to: Map Elements By Using the Diagram Element Map Tool, or How to: Add a Swimlane Map (DSL Explorer).

    You can now click Transform All Templates in Solution Explorer and start a Visual Studio experimental build to verify that the swimlane has been defined and mapped to a domain class. In the generated designer, right-click the swimlane header, and click Add After or Add Before to insert additional swimlanes.

See Also

Concepts

Domain-Specific Language Designer Terminology Overview

Defining Diagram Elements

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

Domain-Specific Language Tools Glossary