Share via


Defining Connector Maps

Connectors are used to display the links between model elements. Connectors are lines that have a source end and a target end. You can specify the style of the line (solid, dashed, dotted) and the style of each end (plain, arrow, or diamond).

The following procedure shows how to map a connector to a domain relationship and specify the style for the line and the two ends.

To map a domain relationship to a connector

  1. Create a Domain-Specific Language Tools solution by using the MinimalLanguage template.

  2. Add a domain class named Comment.

  3. Add a reference relationship between Comment and ExampleElement, and name it CommentReferencesElements.

  4. Add a geometry shape and map it to Comment.

  5. Add a connector and name it CommentReferencesElementsConnector.

  6. Select the Diagram Element Map tool in the Toolbox, click the CommentReferencesElement relationship, and then click the connector.

  7. Select the mapping line, and then click the DSL Details window. The Connector box should be set to CommentReferencesElementConnector, and the Domain relationship box should be set to CommentReferencesElements.

  8. Select the connector, and in the Properties window, set the value of Dash Style to Dot.

  9. Set the value of Source End Style to Hollow Arrow, and set the value of Target End Style to Empty Diamond.

  10. You must add Toolbox items for the domain classes and the domain relationship before a user of your domain-specific language designer can add them to the diagram. For information about how to add items to the Toolbox, see Customizing Tools and the Toolbox.

See Also

Other Resources

Domain-Specific Language Tools Glossary

Change History

Date

History

Reason

July 2008

Rewrote and refactored project.

Content bug fix.