Using the Open API you can add an annotation to any base element (a model element or a symbol on the diagram pane). Annotations are used to highlight and adorn elements in the Containment tree and on the diagram pane. For example validation engine is using annotations for showing invalid elements.
Annotation has the following properties:
- severity - like an error, warning, info, debug, fatal
- kind - a string representing the annotation short name
- text - a string representing the annotation text
- target - a target base element
- actions - an optional list of actions. They are shown in a diagram on a symbol’s smart manipulator.
To add or remove annotations, use com.nomagic.magicdraw.annotation.AnnotationManager.
More information is available in javadoc.