use of org.eclipse.xtext.ide.server.symbol.IDocumentSymbolService in project xtext-core by eclipse.
the class LanguageServerImpl method documentSymbol.
/**
* Compute the symbol information. Executed in a read request.
* @since 2.20
*/
protected List<Either<SymbolInformation, DocumentSymbol>> documentSymbol(DocumentSymbolParams params, CancelIndicator cancelIndicator) {
URI uri = getURI(params.getTextDocument());
IDocumentSymbolService documentSymbolService = getIDocumentSymbolService(getResourceServiceProvider(uri));
if (documentSymbolService == null) {
return Collections.emptyList();
}
return workspaceManager.doRead(uri, (document, resource) -> documentSymbolService.getSymbols(document, resource, params, cancelIndicator));
}
Aggregations