boolean (@Nullable PsiExpression expression) { expression = PsiUtil.deparenthesizeExpression(expression); if (expression == null || expression instanceof PsiLiteralExpression) { return true; } if (expression instanceof PsiReferenceExpression) { PsiExpression qualifier = ((PsiReferenceExpression)expression).getQualifierExpression(); return qualifier == null || qualifier instanceof PsiQualifiedExpression; } if (expression instanceof PsiUnaryExpression) { return isSimpleExpression(((PsiUnaryExpression)expression).getOperand()); } return false; }