protected @NlsSafe String generateDoc(String str, String name, String typeName, String version) {
    if (str == null) return null;
    StringBuilder buf = new StringBuilder(str.length() + 20);

    DocumentationUtil.formatEntityName(typeName == null ? XmlBundle.message("xml.javadoc.tag.name.message"):typeName,name,buf);

    final String indent = "  ";
    final StringBuilder builder = buf.append(XmlBundle.message("xml.javadoc.description.message")).append(indent).
        append(HtmlDocumentationProvider.NBSP).append(str);
    if (version != null) {
      builder.append(HtmlDocumentationProvider.BR).append(XmlBundle.message("xml.javadoc.version.message")).append(indent)
          .append(HtmlDocumentationProvider.NBSP).append(version);
    }
    return builder.toString();
  }
protected @NlsSafe String generateDoc(String str, String name, String typeName, String version)