nitc :: CmdFeatures
Mostly a list of mentities defined in mentity
.
nitc :: CmdFeatures :: defaultinit
nitc $ CmdFeatures :: SELF
Type of this instance, automatically specialized in every classnitc $ CmdFeatures :: init_results
Same asCmdEntity::init_mentity
nitc :: html_commands $ CmdFeatures :: to_html
Render results as a HTML stringnitc :: md_commands $ CmdFeatures :: to_md
Render results as a Markdown stringnitc :: CmdEntity :: _mentity_name
Name of the mentity this command is aboutnitc :: CmdEntities :: _sorter
core :: 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 :: CmdEntityList :: defaultinit
nitc :: DocCommand :: defaultinit
nitc :: CmdEntity :: defaultinit
nitc :: CmdFeatures :: defaultinit
nitc :: CmdList :: defaultinit
nitc :: CmdEntities :: defaultinit
core :: Object :: 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 :: 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 feature list
#
# Mostly a list of mentities defined in `mentity`.
class CmdFeatures
super CmdEntityList
# Same as `CmdEntity::init_mentity`
#
# Plus `WarningNoFeatures` if no features are found for `mentity`.
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 mentities = new Array[MEntity]
if mentity isa MPackage then
mentities.add_all mentity.collect_mgroups(filter)
mentities.add_all mentity.collect_mmodules(filter)
else if mentity isa MGroup then
mentities.add_all mentity.collect_mgroups(filter)
mentities.add_all mentity.collect_mmodules(filter)
else if mentity isa MModule then
mentities.add_all mentity.collect_local_mclassdefs(filter)
else if mentity isa MClass then
mentities.add_all mentity.collect_intro_mproperties(filter)
mentities.add_all mentity.collect_redef_mpropdefs(filter)
else if mentity isa MClassDef then
mentities.add_all mentity.collect_intro_mpropdefs(filter)
mentities.add_all mentity.collect_redef_mpropdefs(filter)
else if mentity isa MProperty then
mentities.add_all mentity.collect_mpropdefs(filter)
else
return new WarningNoFeatures(mentity)
end
self.results = mentities
return res
end
end
src/doc/commands/commands_model.nit:290,1--329,3
redef class CmdFeatures
redef fun to_md do return super # FIXME lin
end
src/doc/templates/md_commands.nit:153,1--155,3
redef class CmdFeatures
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
end
src/doc/term/term.nit:204,1--209,3
redef class CmdFeatures
redef fun to_html do return super # FIXME lin
end
src/doc/templates/html_commands.nit:180,1--182,3