public class SimpleFoldingBuilder extends FoldingBuilderEx {
@NotNull
@Override
public FoldingDescriptor[] buildFoldRegions(@NotNull PsiElement root, @NotNull Document document, boolean quick) {
FoldingGroup group = FoldingGroup.newGroup("simple");
List<FoldingDescriptor> descriptors = new ArrayList<FoldingDescriptor>();
Collection<PsiLiteralExpression> literalExpressions = PsiTreeUtil.findChildrenOfType(root, PsiLiteralExpression.class);
for (final PsiLiteralExpression literalExpression : literalExpressions) {
String value = (String) literalExpression.getValue();