PsiAssignmentExpression (@Nullable PsiElement anchor) { if (!(anchor instanceof PsiExpressionStatement)) return null; final PsiExpression anchorExpression = ((PsiExpressionStatement)anchor).getExpression(); if (!(anchorExpression instanceof PsiAssignmentExpression)) return null; return (PsiAssignmentExpression)anchorExpression; }