boolean (PsiExpression expression) { PsiElement parent = expression.getParent(); while (parent instanceof PsiParenthesizedExpression || parent instanceof PsiConditionalExpression && (expression == ((PsiConditionalExpression)parent).getThenExpression() || expression == ((PsiConditionalExpression)parent).getElseExpression())) { expression = (PsiExpression)parent; parent = expression.getParent(); } return parent instanceof PsiExpression; }