private static void foldBlock(@NotNull List<FoldingDescriptor> descriptors, @NotNull Collection<PsiElement> psiElements) {
    psiElements.forEach(element -> {
      if (element instanceof ShBlock || element instanceof ShDoBlock) descriptors.add(new FoldingDescriptor(element, element.getTextRange()));
    });
  }
private static void foldBlock(@NotNull List<FoldingDescriptor> descriptors, @NotNull Collection<PsiElement> psiElements)