boolean (Object element, PsiElement context) { if(!(element instanceof PsiElement)) return true; PsiReferenceExpression referenceExpression = getAssignedReference(context); if (referenceExpression != null && referenceExpression.isReferenceTo((PsiElement)element)) { return false; } return true; }