PsiAssignmentExpression (@NotNull PsiStatement last) { PsiExpressionStatement expressionStatement = tryCast(last, PsiExpressionStatement.class); if (expressionStatement == null) return null; PsiAssignmentExpression assignment = tryCast(expressionStatement.getExpression(), PsiAssignmentExpression.class); if (assignment == null) return null; return assignment; }