@OpenApiAll public abstract class OpenedDiagramValidator extends DiagramValidator implements com.nomagic.magicdraw.core.diagram.DiagramsChangeListener
DiagramValidator, but narrows the scope down only to currently opened diagrams.
When creating annotations, the diagrams in scope should be retrieved by using DiagramValidator.getDiagrams() method.| Constructor and Description |
|---|
OpenedDiagramValidator() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
acceptDiagram(DiagramPresentationElement diagram) |
void |
diagramsChanged(java.util.Collection<DiagramPresentationElement> opened,
java.util.Collection<DiagramPresentationElement> closed)
Called when opened diagrams changes.
|
void |
dispose()
Unregisters all listeners that were registered and releases other resources.
|
void |
init(Project project,
Constraint constraint)
This is the first method that is invoked on the implementation of
the
ValidationRule interface. |
getAnnotations, getDiagrams, getDiagramsStream, getPresentationElements, getProject, isElementInScope, needsRun, needsRun, run, setNeedsRun, setScopeProviderprotected boolean acceptDiagram(DiagramPresentationElement diagram)
acceptDiagram in class DiagramValidatorDiagramValidator.getDiagrams() methodpublic void init(Project project, Constraint constraint)
ValidationRuleValidationRule interface. Implementation can initialize
internal state if required.init in interface ValidationRuleinit in class DiagramValidatorproject - a project of the constraint.constraint - a constraint object.public void diagramsChanged(java.util.Collection<DiagramPresentationElement> opened, java.util.Collection<DiagramPresentationElement> closed)
diagramsChanged in interface com.nomagic.magicdraw.core.diagram.DiagramsChangeListenerpublic void dispose()
DiagramValidatordispose in interface ValidationRuledispose in class DiagramValidator