PsiExpression (PsiExpression comparator) { comparator = PsiUtil.skipParenthesizedExprDown(comparator); while (comparator instanceof PsiMethodCallExpression call) { PsiExpression qualifier = call.getMethodExpression().getQualifierExpression(); if (!COMPARATOR_REVERSE.test(call) || qualifier == null) { break; } comparator = PsiUtil.skipParenthesizedExprDown(qualifier); } return comparator; }