MagicDraw 18.5 Documentation
You can define situations when elements of particular predefined stereotypes or metaclasses are created inside other elements. For example:
- Block contains the BlockProperty property, instead of a standard property.
- Block owns InternalBlockDiagram, instead of a standard CompositeStructureDiagram.
Use properties listed in the customization element Specification window, under the Owned Elements category, to customize these cases.
Customizing Owned Types
Customize the list of owned types in the DSL element shortcut menu (under the Create Element command) in the Model Browser and other lists. The properties used in customizing owned types are:
|Suggested Owned Types|
Specifies the list of stereotypes and metaclasses used when creating inner elements in the DSL element.
|Hidden Owned Types|
Specifies the list of stereotypes and metaclasses not used as inner elements.
You cannot customize a standard element when you use standard UML (rather than DSL) to create certain stereotyped elements (such as a package). In this case, you must specify possible owners using the Possible Owners property from the customization element Specification window. The Possible Owners property specifies the list of stereotypes and metaclasses used when creating owned elements.
Customizing Owned Diagrams
Customize the list of owned diagrams in the DSL element shortcut menu (under the Create Diagram command) in the Model Browser and in other lists. The following are the properties used in customizing owned diagrams:
|Suggested Owned Diagrams|
Specifies types of diagrams appearing in the DSL element shortcut menu when creating possible inner diagrams.
|Hidden Owned Diagrams|
Specifies types of diagrams owned by the DSL element. For example, if the property value is Section, then the Section elements are owned by the customized element.
Until version 17.0.3, the Suggested Owned Type and Hidden Owned Types properties did not function if the customization target was a metaclass.
Customizing Suggested Relationships
You can customize the list of relationships created directly in the model from the Model Browser, starting from a source or target element.
Customize the relationships list according to the following rules:
If a DSL relationship has no connection rules for restricted end types and the Hide Metatype property value specified is true, the DSL relationship will be added into all lists where the extended UML type is selected. For example, the «allocation» relationship in SysML model will be used everywhere Dependency is used.
If a DSL relationship has connection rules, then it will be created only from or to these restricted types.
- No labels