nitc :: CmdIntros :: defaultinit
# TODO remove once the filters/sorters are merged
class CmdIntros
super CmdInheritance
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)
if mentity isa MModule then
var mentities = mentity.collect_intro_mclasses(filter).to_a
self.results = mentities
else if mentity isa MClass then
var mentities = mentity.collect_intro_mproperties(filter).to_a
self.results = mentities
else if mentity isa MClassDef then
var mentities = mentity.collect_intro_mpropdefs(filter).to_a
mainmodule.linearize_mpropdefs(mentities)
self.results = mentities
else
return new WarningNoFeatures(mentity)
end
return res
end
end
src/doc/commands/commands_model.nit:331,1--357,3