private static boolean isBlockElement(@NotNull PsiElement element) {
    PsiElement firstChild = element.getFirstChild();
    PsiElement lastChild = element.getLastChild();
    return firstChild != null && "{".equals(firstChild.getText()) && lastChild != null && "}".equals(lastChild.getText());
  }
private static boolean isBlockElement(@NotNull PsiElement element)