use of org.eclipse.xtext.ide.server.occurrences.IDocumentHighlightService in project xtext-core by eclipse.
the class LanguageServerImpl method documentHighlight.
/**
* Compute the document highlights. Executed in a read request.
* @since 2.20
*/
protected List<? extends DocumentHighlight> documentHighlight(DocumentHighlightParams params, CancelIndicator cancelIndicator) {
URI uri = getURI(params);
IDocumentHighlightService service = getService(uri, IDocumentHighlightService.class);
if (service == null) {
return Collections.emptyList();
}
return workspaceManager.doRead(uri, (doc, resource) -> service.getDocumentHighlights(doc, resource, params, cancelIndicator));
}
Aggregations