Property definitions

nitc $ CmdMetadata :: defaultinit
# Retrieve the catalog metadata for a MPackage
class CmdMetadata
	super CmdEntity

	# MPackage metadata retrieved
	var metadata: nullable MPackageMetadata = null is optional, writable

	redef fun init_command do
		if metadata != 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 MPackage then
			metadata = mentity.metadata
		else
			return new WarningNoMetadata(mentity)
		end
		return res
	end
end
src/doc/commands/commands_catalog.nit:100,1--121,3