Collects and linearizes definitions about an MEntity.
nitc :: CmdLinearization :: defaultinit
nitc $ CmdLinearization :: SELF
Type of this instance, automatically specialized in every classnitc $ CmdLinearization :: init_results
Same states thanCmdEntity::init_mentity
nitc :: html_commands $ CmdLinearization :: to_html
Render results as a HTML stringnitc :: md_commands $ CmdLinearization :: to_md
Render results as a Markdown stringnitc :: CmdInheritance :: _mainmodule
Mainmodule for class linearizationnitc :: 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 :: CmdInheritance :: defaultinit
nitc :: CmdEntity :: defaultinit
nitc :: CmdEntityList :: defaultinit
nitc :: CmdLinearization :: defaultinit
nitc :: DocCommand :: 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 :: 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
# Linearization command
#
# Collects and linearizes definitions about an MEntity.
class CmdLinearization
super CmdInheritance
# Same states than `CmdEntity::init_mentity`
#
# Plus returns `WarningNoLinearization` if no linearization can be computed
# from the 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)
sorter = null
results = mentity.collect_linearization(mainmodule)
if results == null then return new WarningNoLinearization(mentity)
return res
end
end
src/doc/commands/commands_model.nit:225,1--247,3
redef class CmdLinearization
redef fun to_md do return super # FIXME lin
end
src/doc/templates/md_commands.nit:157,1--159,3
redef class CmdLinearization
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
end
src/doc/term/term.nit:183,1--188,3
redef class CmdLinearization
redef fun to_html do return super # FIXME lin
end
src/doc/templates/html_commands.nit:184,1--186,3