Normally, tags are used to hold additional specific information. This information helps interpret basic elements differentiated by some external tools, such as transformations, code engineering, etc.
In these cases, you only want to mark the model, not make an impact on existing diagrams.
Tag definitions are properties of stereotype in UML2. UML does not allow using tagged values without assigning stereotype. Your diagrams will be changed when some tags are added into the model.
A modeling tool enables you to make chosen stereotypes or tags in diagrams invisible.
To make a stereotype invisible
The stereotype you want to make invisible must be inherited from «InvisibleStereotype» found in the modeling tool (e.g., MagicDraw) profile.
- Create a custom stereotype.
- Create a Generalization between your stereotype and InvisibleStereotype. Your custom stereotype will be not displayed on symbols where it is applied. Note that all tags will also be invisible on symbols.
To create an invisible tag
- Apply «InvisibleStereotype» on your tag definition (a property of a stereotype).
To make a constraint invisible
- Apply the «InvisibleStereotype» stereotype to the constraint.
- Invisible constraints may be used while creating validation constraints, in DSL customization, or in other modeling cases.