Share via


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

Swimlanes are areas on the generated designer that are separated by horizontal or vertical lines. You can define other shapes to be contained in swimlanes. For more information, see Swimlane (Domain-Specific Language Designer).

After you create and define a swimlane, you must map it to a domain class or another swimlane. For more information, see How to: Add a Domain Class to a Domain-Specific Language Definition and How to: Map Elements By Using the Diagram Element Map Tool.

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

To add a swimlane to a domain-specific language definition

  1. In the Toolbox, on the Dsl Designer tab, drag a swimlane onto the diagram surface of the Domain-Specific Language Designer.

    A swimlane that is named Swimlane1 appears in the designer definition under 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. Set any properties in the Properties window.

    For example, you can change the default value of the Separator Line property from dash to solid and the Alignment property from vertical to horizontal.

  5. Map the swimlane to the domain class using the Diagram Element Map tool. For more information, see How to: Map Elements By Using the Diagram Element Map Tool.

  6. Click Transform All Templates in Solution Explorer.

  7. On the Build menu, click Rebuild Solution to start a Visual Studio experimental build to display how the swimlane has been defined and mapped to a domain class.

    In the generated designer, right-click the mapped swimlane's 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 (DSL Explorer)

Domain-Specific Language Tools Glossary