Search in sources :

Example 1 with ValidationRenderer

use of org.eclipse.sirius.components.validation.render.ValidationRenderer in project sirius-components by eclipse-sirius.

the class ValidationEventProcessor method refreshValidation.

private Validation refreshValidation() {
    VariableManager variableManager = new VariableManager();
    variableManager.put(IEditingContext.EDITING_CONTEXT, this.editingContext);
    ValidationComponentProps validationComponentProps = new ValidationComponentProps(variableManager, this.validationDescription, Optional.ofNullable(this.validationContext.getValidation()));
    Element element = new Element(ValidationComponent.class, validationComponentProps);
    Validation validation = new ValidationRenderer().render(element);
    // $NON-NLS-1$
    this.logger.trace("Validation refreshed: {}", this.editingContext.getId());
    return validation;
}
Also used : VariableManager(org.eclipse.sirius.components.representations.VariableManager) ValidationComponentProps(org.eclipse.sirius.components.validation.components.ValidationComponentProps) Validation(org.eclipse.sirius.components.validation.Validation) Element(org.eclipse.sirius.components.representations.Element) ValidationRenderer(org.eclipse.sirius.components.validation.render.ValidationRenderer)

Aggregations

Element (org.eclipse.sirius.components.representations.Element)1 VariableManager (org.eclipse.sirius.components.representations.VariableManager)1 Validation (org.eclipse.sirius.components.validation.Validation)1 ValidationComponentProps (org.eclipse.sirius.components.validation.components.ValidationComponentProps)1 ValidationRenderer (org.eclipse.sirius.components.validation.render.ValidationRenderer)1