次の方法で共有


Moveable decorators

Behavior in previous versions of the DSL Tools

In previous versions of the DSL Tools, such as, in the DSL Class diagram which is provided as a sample, you could very easily end-up with a very cluttered diagram:

image

New behavior

With the moveable decorators feature, the DSL author can choose let the decorators on a connector be moveable by the user.

How the DSL author enables the moveable decorators?

  1. In the DslDefinition.dsl file, select the decorators of the connector that you want to let moveable. Note in the picture below that I selected the four decorators of the AssociationConnector
  2. In the Properties window, change the IsMoveable property to True
  3. Transform All templates and rebuild

image

What is the behavior for the user?

Having letting the decorators on this connector being moveable, the designer’s user will now be able to drag each of them to the position of his/her choice:

image

If the user selects a decorator, it will be visualized with a segment from the original location to the moved location

image

 

If the user selects the connector, all the segments from the connector to the moved position will be displayed:

image

 

If the user wants to reset the location of a moved decorator to its original location, there is a contextual command

image  which let the decorator get it’s original location image

 

Improvements for Beta2

In Beta1, the segments from the connector to the decorators are visible even if the displayed text is empty, which a few customers have found to be is a bit confusing. Therefore, in Beta2 these lines will be invisible if the text is empty, and the empty decorators won’t be selectable.