boolean (PsiStatement statement) { if (statement == null) { return false; } if (statement instanceof PsiEmptyStatement) { return true; } if (statement instanceof final PsiBlockStatement blockStatement) { final PsiCodeBlock codeBlock = blockStatement.getCodeBlock(); final PsiStatement[] codeBlockStatements = codeBlock.getStatements(); for (PsiStatement codeBlockStatement : codeBlockStatements) { if (!statementIsEmpty(codeBlockStatement)) { return false; } } return true; } return false; }