#
# You should redefine this method depending on the organization or your
# output.
- fun html_link: Link do
- var title = null
+ fun html_link(text, title: nullable String): Link do
+ if text == null then
+ text = html_name
+ end
var mdoc = self.mdoc_or_fallback
- if mdoc != null then
+ if title == null and mdoc != null then
title = mdoc.synopsis.html_escape
end
- return new Link(html_url, html_name, title)
+ return new Link(html_url, text, title)
end
# Returns the complete MEntity declaration decorated with HTML
end
redef class MPackage
- redef fun html_url do return "package_{html_id}.html"
redef fun html_namespace do return html_link
redef fun html_icon do return new BSIcon("book", ["text-muted"])
redef var css_classes = ["public"]
end
redef class MGroup
- redef fun html_url do return "group_{html_id}.html"
redef fun html_icon do return new BSIcon("folder-close", ["text-muted"])
redef fun html_namespace do
end
redef class MModule
- redef fun html_url do return "module_{html_id}.html"
redef fun html_icon do return new BSIcon("file", ["text-muted"])
redef fun html_namespace do
end
redef class MClass
- redef fun html_url do return "class_{html_id}.html"
redef fun html_icon do return new BSIcon("stop", css_classes)
redef fun html_signature(short) do return intro.html_signature(short)
redef fun css_classes do return super + [visibility.to_s]
end
redef class MClassDef
- redef fun html_url do return "{mclass.html_url}#{html_id}"
redef fun css_classes do return super + mclass.css_classes
redef fun html_namespace do
end
redef class MProperty
- redef fun html_url do return "property_{html_id}.html"
redef fun html_declaration do return intro.html_declaration
redef fun html_signature(short) do return intro.html_signature(short)
redef fun html_icon do return new BSIcon("tag", css_classes)
end
redef class MPropDef
- redef fun html_url do return "{mproperty.html_url}#{html_id}"
redef fun css_classes do return super + mproperty.css_classes
redef fun html_namespace do
end
redef class MVirtualTypeProp
- redef fun html_link do return mvirtualtype.html_link
+ redef fun html_link(text, title) do return mvirtualtype.html_link(text, title)
end
redef class MVirtualTypeDef
end
redef class MClassType
- redef fun html_link do return mclass.html_link
+ redef fun html_link(text, title) do return mclass.html_link(text, title)
end
redef class MNullableType
end
redef class MParameterType
- redef fun html_link do
- return new Link("{mclass.html_url}#FT_{name.to_cmangle}", name, "formal type")
+ redef fun html_link(text, title) do
+ if text == null then text = name
+ if title == null then title = "formal type"
+ return new Link("{mclass.html_url}#FT_{name.to_cmangle}", text, title)
end
end
redef class MVirtualType
- redef fun html_link do return mproperty.intro.html_link
+ redef fun html_link(text, title) do return mproperty.intro.html_link(text, title)
end
redef class MSignature