in src/dotnet/RiderPlugin.EnhancedUnrealEngineDocumentation/EnhancedReflectionQuickDocPresenter.cs [36:122]
public override QuickDocTitleAndText GetHtml(PsiLanguageType presentationLanguage)
{
var doc = RichTextFromSimpleMarkdown.Convert(_documentation.documentation.text);
var formattedTitle = FormatTitle(_documentation.name);
var text = XmlDocHtmlUtil.BuildHtml(
(_, output) => output.Append(formattedTitle).Append("<br><br>", TextStyle.Default).Append(doc),
XmlDocHtmlUtil.NavigationStyle.None, _theming).Append("<br><br>");
if (_documentation.comment != null)
{
var comment = RichTextFromSimpleMarkdown.Convert(_documentation.comment);
text.Append("<blockquote><p>").Append(comment).Append("</p></blockquote>");
text.Append("<br>");
}
if (_documentation.position.IsNotEmpty() && _documentation.type.IsNotEmpty())
{
var attribute = "UPROPERTY";
var prefix = _documentation.position == "main" ? $"{attribute}(" : $"{attribute}(meta=(";
var suffix = _documentation.position == "main" ? ")" : "))";
var body = _documentation.type switch
{
"flag" => $"{_documentation.name}",
"bool" => $"{_documentation.name}=true",
"string" => $"{_documentation.name}=\"abc\"",
"number" or "integer" => $"{_documentation.name}=123",
_ => ""
};
text.Append($"<p><code>{prefix}{body}{suffix}</code</p>").Append("<br>");
}
if (_documentation.samples is { Capacity: > 0 })
{
text.Append($"<h4>Samples:</h4>" +
_documentation.samples.Select(it => $"<pre>{it}</pre><hr/>").Join(""));
text.Append("<br>");
}
text.Append("<dl>");
if (_documentation.related is { Capacity: > 0 })
{
text.Append($"<dt>Related:</dt><ul>");
text.Append(_documentation.related.Select(it =>
$"<li><dd><a href=\"https://unreal-garden.com/docs/{_documentation.category}/#{it.ToLower()}\">{it}</a></dd></li>")
.Join(""));
text.Append("</ul>");
text.Append("<br>");
}
if (_documentation.antonyms is { Capacity: > 0 })
{
text.Append($"<dt>Opposite:</dt><ul>");
text.Append(_documentation.antonyms.Select(it =>
$"<li><dd><a href=\"https://unreal-garden.com/docs/{_documentation.category}/#{it.ToLower()}\">{it}</a></dd></li>")
.Join(""));
text.Append("</ul>");
text.Append("<br>");
}
if (_documentation.incompatible is { Capacity: > 0 })
{
text.Append($"<dt>Incompatible:</dt><ul>");
text.Append(_documentation.incompatible.Select(it =>
$"<li><dd><a href=\"https://unreal-garden.com/docs/{_documentation.category}/#{it.ToLower()}\">{it}</a></dd></li>")
.Join(""));
text.Append("</ul>");
text.Append("<br>");
}
if (_documentation.implies is { Capacity: > 0 })
{
text.Append($"<dt>Implies:</dt><ul>");
text.Append(_documentation.implies.Select(it =>
$"<li><dd><a href=\"https://unreal-garden.com/docs/{_documentation.category}/#{it.ToLower()}\">{it}</a></dd></li>")
.Join(""));
text.Append("</ul>");
text.Append("<br>");
}
text.Append($"</dl>");
text.Append($"<a href=\"https://unreal-garden.com/docs/{_documentation.category}/#{_documentation.name.ToLower()}\">Full Documentation</a><br>");
if (_documentation.images != null)
{
text.Append(_documentation.images.Select(it => $"<img src=\"https://unreal-garden.com/{it}\">").Join(""));
}
return new QuickDocTitleAndText(text, _documentation.name.NON_LOCALIZABLE());
}