use of org.eclipse.xtext.ide.server.folding.FoldingRangeService in project xtext-core by eclipse.
the class LanguageServerImpl method foldingRange.
/**
* @since 2.26
*/
protected List<FoldingRange> foldingRange(FoldingRangeRequestParams params, CancelIndicator cancelIndicator) {
URI uri = getURI(params.getTextDocument());
FoldingRangeService foldingRangeService = getService(uri, FoldingRangeService.class);
if (foldingRangeService == null) {
return Lists.newArrayList();
}
return workspaceManager.doRead(uri, (document, resource) -> foldingRangeService.createFoldingRanges(document, resource, cancelIndicator));
}
Aggregations