The validation rule returns annotations as validation results to the validation engine. Each annotation can contain a list of action objects that implements how a particular problem found by the validation rule can be solved. In order to create an action for solving, the validation rule’s provider must create a Java class that extends the com.nomagic.actions.NMAction class and implement the actionPerformed(java.awt.event.ActionEvent) method. A user will be able to invoke the action from the validation results table or from the browser. In order to enable performing the action on multiple targets, the action class must implement the com.nomagic.magicdraw.annotation.AnnotationAction interface.

See MyAction.java, FixJavaConstantNamesAction.java, MyBinaryValidationRuleImpl.java and JavaConstantNameValidationRuleImpl.java examples in <program installation directory>\openapi\examples\validation.