use of org.eclipse.sirius.components.forms.elements.LinkElementProps in project sirius-components by eclipse-sirius.
the class LinkComponent method render.
@Override
public Element render() {
VariableManager variableManager = this.props.getVariableManager();
LinkDescription linkDescription = this.props.getLinkDescription();
String id = linkDescription.getIdProvider().apply(variableManager);
String label = linkDescription.getLabelProvider().apply(variableManager);
String url = linkDescription.getUrlProvider().apply(variableManager);
List<Element> children = List.of(new Element(DiagnosticComponent.class, new DiagnosticComponentProps(linkDescription, variableManager)));
// @formatter:off
LinkElementProps linkElementProps = LinkElementProps.newLinkElementProps(id).label(label).url(url).children(children).build();
return new Element(LinkElementProps.TYPE, linkElementProps);
// @formatter:on
}
Aggregations