use of org.eclipse.sirius.components.view.Conditional in project sirius-components by eclipse-sirius.
the class DiagramDescriptionValidator method validate.
@Override
public boolean validate(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context) {
boolean isValid = true;
if (eObject instanceof DiagramDescription) {
DiagramDescription diagramDescription = (DiagramDescription) eObject;
isValid = this.hasProperDomainType(diagramDescription, diagnostics) && isValid;
}
if (eObject instanceof DiagramElementDescription) {
DiagramElementDescription diagramElementDescription = (DiagramElementDescription) eObject;
isValid = this.hasProperDomainType(diagramElementDescription, diagnostics) && isValid;
}
if (eObject instanceof NodeStyle) {
NodeStyle nodeStyle = (NodeStyle) eObject;
isValid = this.hasProperColor(nodeStyle, diagnostics) && isValid;
}
if (eObject instanceof Conditional) {
Conditional conditional = (Conditional) eObject;
isValid = this.conditionIsPresent(conditional, diagnostics) && isValid;
}
if (eObject instanceof CreateInstance) {
CreateInstance createInstance = (CreateInstance) eObject;
isValid = this.hasProperDomainType(createInstance, diagnostics) && isValid;
}
return isValid;
}
Aggregations