void (@NotNull List<? super FoldingDescriptor> list, @NotNull Document document, @NotNull PsiReferenceParameterList parameterList, int ifLongerThan, boolean quick) { if (!quick) { for (final PsiType type : parameterList.getTypeArguments()) { if (!type.isValid()) { return; } if (type instanceof PsiClassType || type instanceof PsiArrayType) { if (PsiUtil.resolveClassInType(type) == null) { return; } } } } final String text = parameterList.getText(); if (text.startsWith("<") && text.endsWith(">") && text.length() > ifLongerThan) { final TextRange range = parameterList.getTextRange(); addFoldRegion(list, parameterList, document, true, range, "<~>", JavaCodeFoldingSettings.getInstance().isCollapseConstructorGenericParameters()); } }