nitc :: HInfoBoxable :: infobox
# An new infobox documenting the entity
fun infobox(v: HtmlightVisitor): HInfoBox is abstract
src/htmlight.nit:420,2--421,54
redef fun infobox(v)
do
var declared_type = self.declared_type
if declared_type == null then
var res = new HInfoBox(v, "{name}")
res.new_field("local var").append("{name}")
return res
end
var res = new HInfoBox(v, "{name}: {declared_type}")
res.new_field("local var").append("{name}:").add(declared_type.linkto(v))
return res
end
src/htmlight.nit:707,2--718,4
redef fun infobox(v)
do
var res = new HInfoBox(v, "call {mpropdef}")
res.href = v.hrefto(mpropdef)
if not v.show_infobox then return res
res.new_field("call").add(mpropdef.linkto(v)).add(msignature.linkto(v))
if mpropdef.is_intro then
else
res.new_field("intro").add mproperty.intro.linkto_text(v, "in {mproperty.intro.mclassdef}")
end
add_doc_to_infobox(res)
return res
end
src/htmlight.nit:685,2--698,4
redef fun infobox(v)
do
var res = new HInfoBox(v, "class {mclass.name}")
res.href = v.hrefto(self)
if not v.show_infobox then return res
if is_intro then
res.new_field("class").text(mclass.name)
else
res.new_field("redef class").text(mclass.name)
res.new_field("intro").add mclass.intro.linkto_text(v, "in {mclass.intro_mmodule.to_s}")
end
add_doc_to_infobox(res)
var in_hierarchy = self.in_hierarchy
if in_hierarchy == null then return res
if in_hierarchy.greaters.length > 1 then
var c = res.new_dropdown("hier", "super-classes")
for x in in_hierarchy.greaters do
if x == self then continue
if not x.is_intro then continue
c.open("li").add x.linkto(v)
end
end
if in_hierarchy.smallers.length > 1 then
var c = res.new_dropdown("hier", "sub-classes")
for x in in_hierarchy.smallers do
if x == self then continue
if not x.is_intro then continue
c.open("li").add x.linkto(v)
end
end
if mclass.mclassdefs.length > 1 then
var c = res.new_dropdown("redefs", "refinements")
for x in mclass.mclassdefs do
if x == self then continue
c.open("li").add x.linkto_text(v, "in {x.mmodule}")
end
end
return res
end
src/htmlight.nit:497,2--537,4
redef fun infobox(v)
do
var res = new HInfoBox(v, to_s)
res.href = v.hrefto(self)
if not v.show_infobox then return res
if self isa MMethodDef then
var msignature = self.msignature
if msignature != null then res.new_field("fun").append(mproperty.name).add msignature.linkto(v)
else if self isa MAttributeDef then
var static_mtype = self.static_mtype
if static_mtype != null then res.new_field("fun").append(mproperty.name).add static_mtype.linkto(v)
else if self isa MVirtualTypeDef then
var bound = self.bound
if bound != null then res.new_field("add").append(mproperty.name).add bound.linkto(v)
else
res.new_field("wat?").append(mproperty.name)
end
if is_intro then
else
res.new_field("intro").add mproperty.intro.linkto_text(v, "in {mproperty.intro.mclassdef}")
end
add_doc_to_infobox(res)
if mproperty.mpropdefs.length > 1 then
var c = res.new_dropdown("redef", "redefinitions")
for x in mproperty.mpropdefs do
c.open("li").add x.linkto_text(v, "in {x.mclassdef}")
end
end
return res
end
src/htmlight.nit:541,2--572,4
redef fun infobox(v)
do
var res = new HInfoBox(v, "module {name}")
res.href = v.hrefto(self)
if not v.show_infobox then return res
res.new_field("module").add(linkto(v))
add_doc_to_infobox(res)
if in_importation.greaters.length > 1 then
var c = res.new_dropdown("imports", "{in_importation.greaters.length-1} modules")
for x in in_importation.greaters do
if x == self then continue
c.open("li").add x.linkto(v)
end
end
return res
end
src/htmlight.nit:476,2--491,4