PsiExpression (PsiExpression expression) { while (true) { if (expression instanceof PsiParenthesizedExpression) { expression = ((PsiParenthesizedExpression)expression).getExpression(); continue; } if (expression instanceof PsiTypeCastExpression) { expression = ((PsiTypeCastExpression)expression).getOperand(); continue; } return expression; } }