void (@NotNull List<? super FoldingDescriptor> list, @NotNull PsiMethodCallExpression expression, @NotNull Document document, boolean quick) { final PsiReferenceExpression methodExpression = expression.getMethodExpression(); final PsiReferenceParameterList parameterList = methodExpression.getParameterList(); if (parameterList == null || parameterList.getTextLength() <= 5) { return; } PsiMethodCallExpression element = expression; while (true) { if (!quick && !resolvesCorrectly(element.getMethodExpression())) return; final PsiElement parent = element.getParent(); if (!(parent instanceof PsiExpressionList) || !(parent.getParent() instanceof PsiMethodCallExpression)) break; element = (PsiMethodCallExpression)parent.getParent(); } addTypeParametersFolding(list, document, parameterList, 3, quick); }