Search in sources :

Example 1 with XbaseInformationControlInput

use of org.eclipse.xtext.xbase.ui.hover.XbaseInformationControlInput in project xtext-xtend by eclipse.

the class XtendHoverProvider method getHoverInfo.

@Override
protected XtextBrowserInformationControlInput getHoverInfo(EObject element, IRegion hoverRegion, XtextBrowserInformationControlInput previous) {
    XtextBrowserInformationControlInput hoverInfo = super.getHoverInfo(element, hoverRegion, previous);
    if (hoverInfo instanceof XbaseInformationControlInput) {
        XbaseInformationControlInput xbaseHoverInfo = (XbaseInformationControlInput) hoverInfo;
        Pair<String, String> prefixAndSuffixPair = xtendHoverSerializer.computePreAndSuffix(element);
        String unsugaredExpression = xtendHoverSerializer.computeUnsugaredExpression(element);
        return new XbaseInformationControlInput(previous, xbaseHoverInfo, prefixAndSuffixPair.getFirst(), unsugaredExpression, prefixAndSuffixPair.getSecond());
    }
    return hoverInfo;
}
Also used : XbaseInformationControlInput(org.eclipse.xtext.xbase.ui.hover.XbaseInformationControlInput) XtextBrowserInformationControlInput(org.eclipse.xtext.ui.editor.hover.html.XtextBrowserInformationControlInput)

Aggregations

XtextBrowserInformationControlInput (org.eclipse.xtext.ui.editor.hover.html.XtextBrowserInformationControlInput)1 XbaseInformationControlInput (org.eclipse.xtext.xbase.ui.hover.XbaseInformationControlInput)1