private boolean shouldHandleAsSimpleBlock(@NotNull ASTNode node) {
    if (!mySettings.KEEP_SIMPLE_BLOCKS_IN_ONE_LINE) return false;

    PsiElement prev = node.getPsi().getPrevSibling();
    if (prev instanceof PsiWhiteSpace && prev.textContains('\n')) {
      return false;
    }
    PsiElement element = node.getPsi();

    return !node.textContains('\n') &&
           (element instanceof PsiCodeBlock body && shouldAddNewLineWhenBodyIsPresent(body) ||
            element instanceof PsiBlockStatement statement && shouldAddNewLineWhenBodyIsPresent(statement.getCodeBlock()));
  }
private boolean shouldHandleAsSimpleBlock(@NotNull ASTNode node)