PsiElement (PsiElement element) { PsiElement parent = element.getParent(); while (parent instanceof PsiParenthesizedExpression || parent instanceof PsiTypeCastExpression || parent instanceof PsiConditionalExpression) { parent = parent.getParent(); } return parent; }