nitc :: CmdDescendants :: _children
Include direct children in the descendants listnitc :: CmdDescendants :: children
Include direct children in the descendants listnitc :: CmdDescendants :: children=
Include direct children in the descendants listnitc :: CmdDescendants :: defaultinit
nitc $ CmdDescendants :: SELF
Type of this instance, automatically specialized in every classnitc :: commands_http $ CmdDescendants :: http_init
Init the command from an HTTPRequestnitc $ CmdDescendants :: init_results
Initialize theresults
list
nitc :: commands_parser $ CmdDescendants :: parser_init
Initialize the command from the CommandParser datanitc :: html_commands $ CmdDescendants :: to_html
Render results as a HTML stringnitc :: md_commands $ CmdDescendants :: to_md
Render results as a Markdown stringnitc :: CmdDescendants :: _children
Include direct children in the descendants listnitc :: CmdInheritance :: _mainmodule
Mainmodule for class linearizationnitc :: CmdEntity :: _mentity_name
Name of the mentity this command is aboutnitc :: CmdEntities :: _sorter
nitc :: CmdDescendants :: children
Include direct children in the descendants listnitc :: CmdDescendants :: children=
Include direct children in the descendants listcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: DocCommand :: cmd_filter
Return a new filter for that command execution.nitc :: CmdEntity :: defaultinit
nitc :: CmdEntityList :: defaultinit
nitc :: CmdDescendants :: defaultinit
core :: Object :: defaultinit
nitc :: CmdInheritance :: defaultinit
nitc :: DocCommand :: defaultinit
nitc :: CmdEntities :: defaultinit
nitc :: CmdList :: defaultinit
nitc :: DocCommand :: execute
nitc :: DocCommand :: filter=
ModelFilter to apply if anynitc :: DocCommand :: http_init
Init the command from an HTTPRequestcore :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
nitc :: CmdInheritance :: mainmodule=
Mainmodule for class linearizationnitc :: CmdEntity :: mentity_name
Name of the mentity this command is aboutnitc :: CmdEntity :: mentity_name=
Name of the mentity this command is aboutcore :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).nitc :: DocCommand :: parser_init
Initialize the command from the CommandParser datanitc :: CmdList :: print_list
nitc :: DocCommand :: to_json
Return a JSON Serializable representation ofself
results
# MEntity descendants command
class CmdDescendants
super CmdInheritance
# Include direct children in the descendants list
#
# Default is `true`.
var children = true is optional, writable
redef fun init_results do
if results != null then return new CmdSuccess
var res = super
if not res isa CmdSuccess then return res
var mentity = self.mentity.as(not null)
var descendants = mentity.collect_descendants(mainmodule, filter).to_a
if children then
results = descendants
return res
end
var children = mentity.collect_children(mainmodule, filter)
var mentities = new HashSet[MEntity]
for descendant in descendants do
if not children.has(descendant) then mentities.add descendant
end
results = mentities.to_a
return res
end
end
src/doc/commands/commands_model.nit:193,1--223,3
redef class CmdDescendants
redef fun parser_init(mentity_name, options) do
var opt_children = options.opt_bool("no-children")
if opt_children != null then children = not opt_children
return super
end
end
src/doc/commands/commands_parser.nit:348,1--354,3
redef class CmdDescendants
redef fun to_md do return super # FIXME lin
end
src/doc/templates/md_commands.nit:149,1--151,3
redef class CmdDescendants
redef fun http_init(req) do
var opt_children = req.bool_arg("children")
if opt_children != null then children = opt_children
return super
end
end
src/doc/commands/commands_http.nit:139,1--145,3
redef class CmdDescendants
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
end
src/doc/term/term.nit:176,1--181,3
redef class CmdDescendants
redef fun to_html do return super # FIXME lin
end
src/doc/templates/html_commands.nit:176,1--178,3