Search in sources :

Example 1 with SignatureInfo

use of org.eclipse.che.ide.api.editor.signature.SignatureInfo in project che by eclipse.

the class SignatureHelpView method render.

private void render() {
    if (signatureHelp.getSignatures().size() > 1) {
        Elements.addClassName(resources.css().multiple(), rootElement);
        overloads.getStyle().setDisplay("block");
    } else {
        Elements.removeClassName(resources.css().multiple(), rootElement);
        overloads.getStyle().setDisplay("none");
    }
    signatures.setInnerHTML("");
    signatureViews = new ArrayList<>();
    int height = 0;
    for (SignatureInfo signatureInfo : signatureHelp.getSignatures()) {
        Element signatureElement = renderSignature(signatures, signatureInfo, signatureHelp.getActiveParameter());
        renderDocumentation(signatureElement, signatureInfo, signatureHelp.getActiveParameter());
        int signatureHeight = signatureElement.getOffsetHeight();
        signatureViews.add(Pair.of(height, signatureHeight));
        height += signatureHeight;
    }
}
Also used : SignatureInfo(org.eclipse.che.ide.api.editor.signature.SignatureInfo) Element(elemental.dom.Element) SpanElement(elemental.html.SpanElement)

Aggregations

Element (elemental.dom.Element)1 SpanElement (elemental.html.SpanElement)1 SignatureInfo (org.eclipse.che.ide.api.editor.signature.SignatureInfo)1