boolean (PsiReferenceExpression ref) { PsiElement parent = ref == null ? null : ref.getParent(); return parent instanceof PsiConditionalExpression && ref == ((PsiConditionalExpression)parent).getThenExpression(); }