Search in sources :

Example 1 with IHoverService

use of org.eclipse.xtext.ide.server.hover.IHoverService in project xtext-core by eclipse.

the class LanguageServerImpl method hover.

/**
 * Compute the hover. Executed in a read request.
 * @since 2.20
 */
protected Hover hover(HoverParams params, CancelIndicator cancelIndicator) {
    URI uri = getURI(params);
    IHoverService hoverService = getService(uri, IHoverService.class);
    if (hoverService == null) {
        return IHoverService.EMPTY_HOVER;
    }
    return workspaceManager.<Hover>doRead(uri, (document, resource) -> hoverService.hover(document, resource, params, cancelIndicator));
}
Also used : Hover(org.eclipse.lsp4j.Hover) IHoverService(org.eclipse.xtext.ide.server.hover.IHoverService) URI(org.eclipse.emf.common.util.URI)

Aggregations

URI (org.eclipse.emf.common.util.URI)1 Hover (org.eclipse.lsp4j.Hover)1 IHoverService (org.eclipse.xtext.ide.server.hover.IHoverService)1