PsiMethodCallExpression (PsiExpression qualifier) { if (qualifier != null && PsiUtil.skipParenthesizedExprUp(qualifier.getParent()) instanceof PsiReferenceExpression methodExpr && PsiTreeUtil.isAncestor(methodExpr.getQualifierExpression(), qualifier, false) && methodExpr.getParent() instanceof PsiMethodCallExpression call) { return call; } return null; }