Search in sources :

Example 1 with Declaration

use of org.lara.language.specification.dsl.Declaration in project lara-framework by specs-feup.

the class LanguageSpecificationSideBar method toHtml.

private static String toHtml(Parameter parameter) {
    Declaration declaration = parameter.getDeclaration();
    String defaultValue = parameter.getDefaultValue();
    String toHtml = toHtml(declaration);
    if (!defaultValue.isEmpty()) {
        toHtml += " = " + defaultValue;
    }
    return toHtml;
}
Also used : Declaration(org.lara.language.specification.dsl.Declaration)

Example 2 with Declaration

use of org.lara.language.specification.dsl.Declaration in project lara-framework by specs-feup.

the class NodeFactory method toNode.

public static AttributeNode toNode(Attribute attribute) {
    DeclarationNode declNode = toNode(attribute.getDeclaration());
    AttributeNode attrNode = new AttributeNode(declNode);
    attribute.getToolTip().ifPresent(attrNode::setToolTip);
    for (Declaration parameter : attribute.getParameters()) {
        DeclarationNode paramNode = toNode(parameter);
        attrNode.addChild(paramNode);
    }
    return attrNode;
}
Also used : Declaration(org.lara.language.specification.dsl.Declaration)

Aggregations

Declaration (org.lara.language.specification.dsl.Declaration)2