use of org.eclipse.xtext.ui.editor.folding.IFoldingRegionAcceptorExtension in project xtext-xtend by eclipse.
the class XtendFoldingRegionProvider method computeImportFolding.
protected void computeImportFolding(XtendFile xtendFile, IFoldingRegionAcceptor<ITextRegion> foldingRegionAcceptor) {
if (xtendFile.getImportSection() != null && xtendFile.getImportSection().getImportDeclarations().size() > 1) {
ICompositeNode node = NodeModelUtils.findActualNodeFor(xtendFile.getImportSection());
if (node != null) {
ITextRegion textRegion = node.getTextRegion();
((IFoldingRegionAcceptorExtension<ITextRegion>) foldingRegionAcceptor).accept(textRegion.getOffset(), textRegion.getLength(), foldingPreferences.isFoldImports());
}
}
}
Aggregations