boolean (@NotNull FoldingDescriptor foldingDescriptor) { final PsiElement psi = foldingDescriptor.getElement().getPsi(); FoldingBuilder foldingBuilder = LanguageFolding.INSTANCE.forLanguage(psi.getLanguage()); if (foldingBuilder == this || foldingBuilder instanceof CompositeFoldingBuilder) { return isPsiElementCollapsedByDefault(psi); } return foldingBuilder.isCollapsedByDefault(foldingDescriptor); }