boolean (@NotNull PsiUnaryExpression expression) { if (ExpressionUtils.isVoidContext(expression)) { return false; } final IElementType tokenType = expression.getOperationTokenType(); if (!tokenType.equals(JavaTokenType.PLUSPLUS) && !tokenType.equals(JavaTokenType.MINUSMINUS)) { return false; } final PsiStatement statement = PsiTreeUtil.getParentOfType(expression, PsiStatement.class); final PsiForStatement forStatement = PsiTreeUtil.getParentOfType(expression, PsiForStatement.class); if (forStatement != null && PsiTreeUtil.isAncestor(forStatement.getInitialization(), expression, false)) { return false; } return statement != null && (CodeBlockSurrounder.canSurround(expression) || statement instanceof PsiLoopStatement); }