boolean (PsiElement itemObject) { if (isComparisonRhs(myPosition) && myPosition.getParent().getParent() instanceof PsiPolyadicExpression) { PsiExpression[] operands = ((PsiPolyadicExpression)myPosition.getParent().getParent()).getOperands(); if (operands[0] instanceof PsiReferenceExpression && ((PsiReferenceExpression)operands[0]).resolve() == itemObject) { return true; } } return false; }