public static void appendTypeString(@Nls @NotNull StringBuilder buffer, @Nullable PsiType type, PsiElement context, boolean isRendered) {
    if (type instanceof GrTraitType) {
      generateTraitType(buffer, ((GrTraitType)type), context, isRendered);
    }
    else if (type != null) {
      JavaDocInfoGeneratorFactory.getBuilder(context.getProject())
        .setHighlightingManager(GroovyDocHighlightingManager.getInstance())
        .setIsGenerationForRenderedDoc(isRendered)
        .create()
        .generateType(buffer, type, context);
    }
    else {
      appendStyledSignatureFragment(buffer, GrModifier.DEF, GroovyDocHighlightingManager.getInstance().getKeywordAttributes());
    }
  }
public static void appendTypeString(@Nls @NotNull StringBuilder buffer, @Nullable PsiType type, PsiElement context, boolean isRendered)