use of io.typefox.lsapi.Location in project che by eclipse.
the class WorkspaceService method documentSymbol.
@POST
@Path("symbol")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public List<? extends SymbolInformation> documentSymbol(WorkspaceSymbolParamsDTO workspaceSymbolParams) throws ExecutionException, InterruptedException, LanguageServerException {
LanguageServer server = getServer(TextDocumentService.prefixURI(workspaceSymbolParams.getFileUri()));
if (server == null) {
return emptyList();
}
List<? extends SymbolInformation> informations = server.getWorkspaceService().symbol(workspaceSymbolParams).get();
informations.forEach(o -> {
Location location = o.getLocation();
if (location instanceof LocationImpl) {
((LocationImpl) location).setUri(TextDocumentService.removePrefixUri(location.getUri()));
}
});
return informations;
}
Aggregations