void (PsiParameter param, PsiSubstitutor substitutor, StringBuilder buffer) { if (param instanceof GrParameter grParam) { GroovyPresentationUtil.appendParameterPresentation(grParam, substitutor, TypePresentation.PRESENTABLE, buffer, false); final GrExpression initializer = grParam.getInitializerGroovy(); if (initializer != null) { buffer.append(" = ").append(initializer.getText()); } else if (grParam.isOptional()) { String defaultValue = PsiTypesUtil.getDefaultValueOfType(param.getType()); buffer.append(" = ").append(defaultValue); } } else { PsiType t = param.getType(); PsiType paramType = substitutor.substitute(t); buffer.append(paramType.getPresentableText()); String name = param.getName(); buffer.append(" "); buffer.append(name); } }