nitc :: DocCommand :: execute
redef fun execute(no_color) do
var mentity = self.mentity
if mentity == null then return
var full_name = mentity.cs_full_name(no_color)
if no_color == null or not no_color then
print "Documentation for `{full_name}`:".bold
else
print "Documentation for `{full_name}`:"
end
print ""
print " {mentity.cs_icon(no_color)} {mentity.cs_full_name(no_color)}"
print " {mentity.cs_declaration(no_color)}"
print " {mentity.cs_location(no_color)}"
print ""
var mdoc = self.mdoc
if mdoc == null then return
if full_doc then
print mdoc.cs_comment(no_color, 3)
else
print " {mdoc.cs_short_comment(no_color)}\n"
end
end
src/doc/term/term.nit:130,2--152,4
redef fun execute(no_color) do
var mentity = self.mentity.as(not null).full_name
if no_color == null or not no_color then mentity = mentity.blue.bold
var title = "Compiling `{mentity}`:"
if no_color == null or not no_color then
print title.bold
else
print title
end
print ""
var command = self.command
if command != null then print command
end
src/doc/term/term.nit:467,2--481,4
redef fun execute(no_color) do
if no_color == null or not no_color then
print "Catalog statistics:".bold
else
print "Catalog statistics:"
end
var stats = self.stats.as(not null)
print " * {stats.packages} packages"
print " * {stats.modules} modules"
print " * {stats.methods} methods"
print " * {stats.classes} classes"
print " * {stats.loc} lines of code"
print " * {stats.contributors} contributors"
print " * {stats.maintainers} maintainers"
print " * {stats.tags} tags"
end
src/doc/term/term.nit:288,2--304,4
redef fun execute(no_color) do
if no_color == null or not no_color then
print "Tags from catalog:".bold
else
print "Tags from catalog:"
end
print ""
var counts = self.packages_count_by_tags.as(not null)
for tag, count in counts do
if no_color == null or not no_color then
print " * {tag.blue.bold}: {count} packages"
else
print " * {tag}: {count} packages"
end
end
end
src/doc/term/term.nit:308,2--324,4
redef fun execute(no_color) do
var title = "Description from ini file:"
print_ini(title, desc, no_color)
end
src/doc/term/term.nit:368,2--371,4
redef fun execute(no_color) do
var title = "Git URL from ini file:"
print_ini(title, url, no_color)
end
src/doc/term/term.nit:375,2--378,4
redef fun execute(no_color) do
var title = "Issues URL from ini file:"
print_ini(title, url, no_color)
end
src/doc/term/term.nit:389,2--392,4
redef fun execute(no_color) do
var title = "Maintainer from ini file:"
print_ini(title, maintainer, no_color)
end
src/doc/term/term.nit:396,2--399,4
redef fun execute(no_color) do
var contributors = self.contributors
if contributors == null then return
var title = "Contributors list from ini file:"
if no_color == null or not no_color then
print title.bold
else
print title
end
print ""
for contributor in contributors do
print " * {contributor}"
end
end
src/doc/term/term.nit:403,2--416,4
redef fun execute(no_color) do
var title = "License from ini file:"
print_ini(title, license, no_color)
end
src/doc/term/term.nit:420,2--423,4
redef fun execute(no_color) do
var mentity = self.mentity.as(not null).full_name
if no_color == null or not no_color then mentity = mentity.blue.bold
var title = "Synopsis for `{mentity}`:"
if no_color == null or not no_color then
print title.bold
else
print title
end
print ""
var synopsis = self.synopsis
if synopsis != null then print synopsis
end
src/doc/term/term.nit:503,2--517,4
redef fun execute(no_color) do
var mentity = self.mentity.as(not null).full_name
if no_color == null or not no_color then mentity = mentity.blue.bold
var title = "Options for `{mentity}`:"
if no_color == null or not no_color then
print title.bold
else
print title
end
print ""
var options = self.options.as(not null)
for opt, desc in options do
if no_color == null or not no_color then
print " * {opt.blue.bold}: {desc}"
else
print " * {opt}: {desc}"
end
end
end
src/doc/term/term.nit:521,2--541,4
redef fun execute(no_color) do
var mentity = self.mentity
if mentity == null then return
var title = "Code for `{mentity.cs_full_name(no_color)}`:"
if no_color == null or not no_color then
print title.bold
else
print title
end
var node = self.node
if (no_color == null or not no_color) and node != null then
var ansi = render_code(node)
print "~~~"
print ansi.write_to_string
print "~~~"
else
printn mentity.cs_source_code
end
end
src/doc/term/term.nit:215,2--234,4
redef fun execute(no_color) do
print_file("License from", no_color)
end
src/doc/term/term.nit:445,2--447,4
redef fun execute(no_color) do
print_file("Contributing rules from", no_color)
end
src/doc/term/term.nit:451,2--453,4
redef fun execute(no_color) do
var title = "Git clone command from ini file:"
print_ini(title, command, no_color)
end
src/doc/term/term.nit:382,2--385,4
redef fun execute(no_color) do
print_list("Packages from catalog:", results, no_color)
end
src/doc/term/term.nit:282,2--284,4
redef fun execute(no_color) do
var full_name = mentity.as(not null).cs_full_name(no_color)
print_list("Features for `{full_name}`:", results, no_color)
end
src/doc/term/term.nit:205,2--208,4
redef fun execute(no_color) do
var full_name = mentity.as(not null).cs_full_name(no_color)
print_list("Methods accepting `{full_name}` as parameter:", results, no_color)
end
src/doc/term/term.nit:273,2--276,4
redef fun execute(no_color) do
var mentity = self.mentity.as(not null).full_name
if no_color == null or not no_color then mentity = mentity.blue.bold
var title = "Testing `{mentity}`:"
if no_color == null or not no_color then
print title.bold
else
print title
end
print ""
var command = self.command
if command != null then print command
end
src/doc/term/term.nit:485,2--499,4
redef fun execute(no_color) do
var full_name = mentity.as(not null).cs_full_name(no_color)
print_list("Ancestors for `{full_name}`:", results, no_color)
end
src/doc/term/term.nit:156,2--159,4
redef fun execute(no_color) do
var full_name = mentity.as(not null).cs_full_name(no_color)
print_list("Parents for `{full_name}`:", results, no_color)
end
src/doc/term/term.nit:163,2--166,4
redef fun execute(no_color) do
var full_name = mentity.as(not null).cs_full_name(no_color)
print_list("Children for `{full_name}`:", results, no_color)
end
src/doc/term/term.nit:170,2--173,4
redef fun execute(no_color) do
var full_name = mentity.as(not null).cs_full_name(no_color)
print_list("Descendants for `{full_name}`:", results, no_color)
end
src/doc/term/term.nit:177,2--180,4
redef fun execute(no_color) do
var full_name = mentity.as(not null).cs_full_name(no_color)
print_list("Linearization for `{full_name}`:", results, no_color)
end
src/doc/term/term.nit:184,2--187,4