This example presents step-by-step instructions for customizing a drag-and-drop rule, according to the Generalization relationship created between classes after the drag-and-drop.

  1. Create a profile diagram.
  2. Create a class, and name it Class onto Class.
  3. For the Class onto Class class, apply the «DragAndDropSpecification» stereotype .

    New Button

    There is a new button in the Profile diagram palette - Drag and Drop Specification. Use this button to create a class element with the assigned «DragAndDropSpecification» stereotype.

  4. Create a Customization element.
    In the Customization Specification window, assign the Class onto Class element to the Allowed Drag and Drops property under Connection Rules.




  5. In the Customization Specification window, under the General category, for the Customization Target property, assign the Class metaclass.



  6. In the Class onto Class Specification window, specify the following property values:

    • For the Source Element property, specify the Class metaclass. 
    • For the Relation Action Result property, specify the Generalization metaclass. 
    • For the Representation Text property, specify the name of the rule, for example, Create Generalization.

  7. Reopen the project. Drag the class to the other class, the Generalization relationship will be created between these classes.