use of org.eclipse.sirius.components.validation.elements.DiagnosticElementProps in project sirius-components by eclipse-sirius.
the class DiagnosticComponent method render.
@Override
public Element render() {
Object diagnostic = this.props.getDiagnostic();
ValidationDescription validationDescription = this.props.getValidationDescription();
String kind = validationDescription.getKindProvider().apply(diagnostic);
String message = validationDescription.getMessageProvider().apply(diagnostic);
// @formatter:off
DiagnosticElementProps diagnosticElementProps = DiagnosticElementProps.newDiagnosticElementProps(UUID.randomUUID()).kind(kind).message(message).build();
return new Element(DiagnosticElementProps.TYPE, diagnosticElementProps);
}
Aggregations