The Abbreviation property enables creation of a DSL element with an abbreviated name. You can enter the default name while specifying the customization element.
To define an abbreviation
- In the Customization Specification window, click the Customization Target property and then select a stereotype or metaclass for which the abbreviation will be used.
- Click the Abbreviation property and then type the text.
- Reopen the project.
Case Study
We will demonstrate how to add an abbreviation for the class attribute.
- Create a profile diagram.
- Create a customization element named PropertyAbbreviation.
- In the PropertyAbbreviation customization Specification window, click the Customization Target property and then select the Property metaclass.
- Under the Naming category, click the Abbreviation property and type a short name for the property, for example, prop.
- Close the Specification window. Reopen the project.
- Create a class in the class diagram.
- Create an attribute in the class. The property with the predefined name (or abbreviation) is created.