boolean (PsiReferenceExpression variableReference) { PsiExpression qualifierExpression = PsiUtil.skipParenthesizedExprDown(variableReference.getQualifierExpression()); // JLS 16: "Such an assignment is defined to occur if and only if either the simple name of the variable // (or, for a field, its simple name qualified by this) occurs on the left hand side of an assignment operator" // Qualified this is not allowed by spec return qualifierExpression == null || (qualifierExpression instanceof PsiThisExpression && ((PsiThisExpression)qualifierExpression).getQualifier() == null); }