A Nit package, that encompass a product

Introduced properties

private var _browse_url: nullable String

nitc :: MPackage :: _browse_url

private var _c_name: String

nitc :: MPackage :: _c_name

private var _excludes: nullable Array[String]

nitc :: MPackage :: _excludes

Array of relative source paths excluded according to the source.exclude key of the ini
private var _git_dir: nullable String

nitc :: MPackage :: _git_dir

private var _git_url: nullable String

nitc :: MPackage :: _git_url

private var _homepage_url: nullable String

nitc :: MPackage :: _homepage_url

private var _html_url: String

nitc :: MPackage :: _html_url

private var _ini: nullable IniFile

nitc :: MPackage :: _ini

The associated .ini file, if any
private var _issues_url: nullable String

nitc :: MPackage :: _issues_url

private var _license: nullable String

nitc :: MPackage :: _license

private var _location: Location

nitc :: MPackage :: _location

private var _maintainer: nullable String

nitc :: MPackage :: _maintainer

private var _metadata: MPackageMetadata

nitc :: MPackage :: _metadata

Metadata related to this package
private var _mgroups: POSet[MGroup]

nitc :: MPackage :: _mgroups

The group tree, as a POSet
private var _model: Model

nitc :: MPackage :: _model

The model of the package
private var _name: String

nitc :: MPackage :: _name

The name of the package
private var _root: nullable MGroup

nitc :: MPackage :: _root

The root of the group tree
fun accept(filepath: String): Bool

nitc :: MPackage :: accept

Does the source inclusion/inclusion rules of the package ini accept such path?
private fun allowed_ini_keys=(allowed_ini_keys: Array[String])

nitc :: MPackage :: allowed_ini_keys=

private fun browse_url: nullable String

nitc :: MPackage :: browse_url

private fun browse_url=(browse_url: nullable String)

nitc :: MPackage :: browse_url=

protected fun c_name=(c_name: String)

nitc :: MPackage :: c_name=

private fun check_ini(toolcontext: ToolContext)

nitc :: MPackage :: check_ini

private fun check_makefile(toolcontext: ToolContext, mainmodule: MModule)

nitc :: MPackage :: check_makefile

private fun check_man(toolcontext: ToolContext, mainmodule: MModule)

nitc :: MPackage :: check_man

private fun check_readme(toolcontext: ToolContext)

nitc :: MPackage :: check_readme

fun collect_all_mgroups(filter: nullable ModelFilter): HashSet[MGroup]

nitc :: MPackage :: collect_all_mgroups

Collect all groups contained in self
fun collect_all_mmodules(filter: nullable ModelFilter): HashSet[MModule]

nitc :: MPackage :: collect_all_mmodules

Collect all modules contained in self
fun collect_intro_attributes(filter: nullable ModelFilter): Set[MAttribute]

nitc :: MPackage :: collect_intro_attributes

Collect all attributes introduced in self
fun collect_intro_inits(filter: nullable ModelFilter): Set[MMethod]

nitc :: MPackage :: collect_intro_inits

Collect all inits introduced in self
fun collect_intro_mclasses(filter: nullable ModelFilter): HashSet[MClass]

nitc :: MPackage :: collect_intro_mclasses

Collect all classes introduced in self
fun collect_intro_methods(filter: nullable ModelFilter): Set[MMethod]

nitc :: MPackage :: collect_intro_methods

Collect all methods introduced in self excluding inits
fun collect_intro_mproperties(filter: nullable ModelFilter): HashSet[MProperty]

nitc :: MPackage :: collect_intro_mproperties

Collect all properties introduced in self
fun collect_intro_vts(filter: nullable ModelFilter): Set[MVirtualTypeProp]

nitc :: MPackage :: collect_intro_vts

Collect all virtual types introduced in self
fun collect_mgroups(filter: nullable ModelFilter): HashSet[MGroup]

nitc :: MPackage :: collect_mgroups

Collect only groups contained in self.root
fun collect_mmodules(filter: nullable ModelFilter): HashSet[MModule]

nitc :: MPackage :: collect_mmodules

Collect only modules contained in self.root
fun collect_redef_mclasses(filter: nullable ModelFilter): Set[MClass]

nitc :: MPackage :: collect_redef_mclasses

Collect all classes redefined or refined in self
fun collect_redef_mproperties(filter: nullable ModelFilter): HashSet[MProperty]

nitc :: MPackage :: collect_redef_mproperties

Collect all properties redefined in self
private fun contributors=(contributors: Array[String])

nitc :: MPackage :: contributors=

init defaultinit(name: String, model: Model, location: Location)

nitc :: MPackage :: defaultinit

fun excludes: nullable Array[String]

nitc :: MPackage :: excludes

Array of relative source paths excluded according to the source.exclude key of the ini
protected fun excludes=(excludes: nullable Array[String])

nitc :: MPackage :: excludes=

Array of relative source paths excluded according to the source.exclude key of the ini
private fun expand: String

nitc :: MPackage :: expand

Expand self in its own directory
private fun gen_ini: String

nitc :: MPackage :: gen_ini

private fun gen_makefile(model: Model, mainmodule: MModule): nullable String

nitc :: MPackage :: gen_makefile

private fun gen_man(toolcontext: ToolContext, mainmodule: MModule)

nitc :: MPackage :: gen_man

private fun git_dir: nullable String

nitc :: MPackage :: git_dir

private fun git_dir=(git_dir: nullable String)

nitc :: MPackage :: git_dir=

private fun git_exec(cmd: String): nullable String

nitc :: MPackage :: git_exec

private fun git_url: nullable String

nitc :: MPackage :: git_url

private fun git_url=(git_url: nullable String)

nitc :: MPackage :: git_url=

fun has_ini: Bool

nitc :: MPackage :: has_ini

Does self have a ini file?
fun has_makefile: Bool

nitc :: MPackage :: has_makefile

Does self have a Makefile?
private fun has_man: Bool

nitc :: MPackage :: has_man

Does self have a manpage files?
fun has_readme: Bool

nitc :: MPackage :: has_readme

Does self have a README.md file?
fun has_source: Bool

nitc :: MPackage :: has_source

Does self have a source file?
private fun homepage_url: nullable String

nitc :: MPackage :: homepage_url

private fun homepage_url=(homepage_url: nullable String)

nitc :: MPackage :: homepage_url=

fun import_alias(root_name: String): nullable String

nitc :: MPackage :: import_alias

Get the name to search for, for a root_name declared as import in ini
private fun import_aliases_parsed=(import_aliases_parsed: nullable Map[String, ExternalPackage])

nitc :: MPackage :: import_aliases_parsed=

fun ini: nullable IniFile

nitc :: MPackage :: ini

The associated .ini file, if any
protected fun ini=(ini: nullable IniFile)

nitc :: MPackage :: ini=

The associated .ini file, if any
fun ini_path: nullable String

nitc :: MPackage :: ini_path

The path to self ini file
fun is_expanded: Bool

nitc :: MPackage :: is_expanded

Is self in its own directory?
private fun issues_url: nullable String

nitc :: MPackage :: issues_url

private fun issues_url=(issues_url: nullable String)

nitc :: MPackage :: issues_url=

private fun license: nullable String

nitc :: MPackage :: license

private fun license=(license: nullable String)

nitc :: MPackage :: license=

protected fun location=(location: Location)

nitc :: MPackage :: location=

private fun maintainer: nullable String

nitc :: MPackage :: maintainer

private fun maintainer=(maintainer: nullable String)

nitc :: MPackage :: maintainer=

fun makefile_path: nullable String

nitc :: MPackage :: makefile_path

The path to self Makefile
private fun man_path: nullable String

nitc :: MPackage :: man_path

The path to self manpage files
fun metadata: MPackageMetadata

nitc :: MPackage :: metadata

Metadata related to this package
protected fun metadata=(metadata: MPackageMetadata)

nitc :: MPackage :: metadata=

Metadata related to this package
fun mgroups: POSet[MGroup]

nitc :: MPackage :: mgroups

The group tree, as a POSet
protected fun mgroups=(mgroups: POSet[MGroup])

nitc :: MPackage :: mgroups=

The group tree, as a POSet
protected fun model=(model: Model)

nitc :: MPackage :: model=

The model of the package
protected fun name=(name: String)

nitc :: MPackage :: name=

The name of the package
protected fun nitdoc_breadcrumbs=(nitdoc_breadcrumbs: Array[MEntity])

nitc :: MPackage :: nitdoc_breadcrumbs=

fun package_path: nullable String

nitc :: MPackage :: package_path

The path to self
fun readme_path: nullable String

nitc :: MPackage :: readme_path

The path to self README.md
fun root: nullable MGroup

nitc :: MPackage :: root

The root of the group tree
fun root=(root: nullable MGroup)

nitc :: MPackage :: root=

The root of the group tree

Redefined properties

redef type SELF: MPackage

nitc $ MPackage :: SELF

Type of this instance, automatically specialized in every class
redef fun c_name: String

nitc $ MPackage :: c_name

A fully-qualified C-like identifier of this model entity.
redef fun collect_children(mainmodule: MModule, filter: nullable ModelFilter): Set[MENTITY]

nitc :: model_collect $ MPackage :: collect_children

Collect all packages that directly depends on self
redef fun collect_modifiers: Array[String]

nitc :: model_collect $ MPackage :: collect_modifiers

Collect modifier keywords like redef, private etc
redef fun collect_parents(mainmodule: MModule, filter: nullable ModelFilter): Set[MENTITY]

nitc :: model_collect $ MPackage :: collect_parents

Collect all packages directly imported by self
redef fun core_serialize_to(v: Serializer)

nitc :: json_model $ MPackage :: core_serialize_to

Actual serialization of self to serializer
redef fun css_classes: Array[String]

nitc :: html_model $ MPackage :: css_classes

CSS classes used to decorate self
redef fun css_classes=(css_classes: Array[String])

nitc :: html_model $ MPackage :: css_classes=

CSS classes used to decorate self
redef fun examples: Array[MExample]

nitc :: model_examples $ MPackage :: examples

Examples found for self
redef fun full_name: String

nitc $ MPackage :: full_name

A fully-qualified name of this model entity.
redef fun html_icon: BSIcon

nitc :: html_model $ MPackage :: html_icon

An icon representative of the mentity
redef fun html_namespace: Template

nitc :: html_model $ MPackage :: html_namespace

Returns full_name decorated with HTML links
redef fun html_url: String

nitc :: static_html $ MPackage :: html_url

The MEntity URL in the HTML output
redef fun html_url=(html_url: String)

nitc :: static_html $ MPackage :: html_url=

The MEntity URL in the HTML output
redef init init

nitc $ MPackage :: init

redef fun json_namespace: JsonNamespace

nitc :: json_model $ MPackage :: json_namespace

Return self.full_name as an object that can be serialized to json.
redef fun location: Location

nitc $ MPackage :: location

The origin of the definition.
redef fun mdoc_or_fallback: nullable MDoc

nitc $ MPackage :: mdoc_or_fallback

The documentation associated to the entity or their main nested entity.
redef fun mentity_kind_rank: Int

nitc :: model_index $ MPackage :: mentity_kind_rank

Compare MEntity class kind
redef fun model: Model

nitc $ MPackage :: model

The model of the package
redef fun name: String

nitc $ MPackage :: name

The name of the package
redef fun nitdoc_breadcrumbs: Array[MEntity]

nitc :: static_base $ MPackage :: nitdoc_breadcrumbs

MEntities composing the breadcrumbs of a nitdoc page
redef fun parent_concern: nullable MConcern

nitc $ MPackage :: parent_concern

MPackage are always roots of the concerns hierarchy
redef fun to_dot_node: DotNode

nitc :: commands_graph $ MPackage :: to_dot_node

Return self as a DotNode
redef fun to_node(nodes: HashMap[MEntity, NeoNode], model_name: nullable String): NeoNode

nitc :: neo $ MPackage :: to_node

Build a NeoNode representing self.
redef fun to_s: String

nitc $ MPackage :: to_s

User readable representation of self.
redef fun visit_all(v: ModelVisitor)

nitc :: model_visitor $ MPackage :: visit_all

Visit the root group of the package.

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type MENTITY: SELF

nitc :: MEntity :: MENTITY

FIXME used to bypass RTA limitation on type resolution
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
private var _browse_url: nullable String

nitc :: MPackage :: _browse_url

private var _c_name: String

nitc :: MPackage :: _c_name

private var _css_classes: Array[String]

nitc :: MEntity :: _css_classes

CSS classes used to decorate self
private var _deprecation: nullable MDeprecationInfo

nitc :: MEntity :: _deprecation

Is the entity deprecated?
private var _examples: Array[MExample]

nitc :: MEntity :: _examples

Examples found for self
private var _excludes: nullable Array[String]

nitc :: MPackage :: _excludes

Array of relative source paths excluded according to the source.exclude key of the ini
private var _git_dir: nullable String

nitc :: MPackage :: _git_dir

private var _git_url: nullable String

nitc :: MPackage :: _git_url

private var _homepage_url: nullable String

nitc :: MPackage :: _homepage_url

private var _html_full_name: String

nitc :: MEntity :: _html_full_name

The MEntity full_name escaped for HTML
private var _html_id: String

nitc :: MEntity :: _html_id

The MEntity unique ID in the HTML output
private var _html_name: String

nitc :: MEntity :: _html_name

The MEntity name escaped for HTML
private var _html_url: String

nitc :: MEntity :: _html_url

The MEntity URL in the HTML output
private var _html_url: String

nitc :: MPackage :: _html_url

private var _html_url: String

nitc :: MEntity :: _html_url

private var _ini: nullable IniFile

nitc :: MPackage :: _ini

The associated .ini file, if any
private var _is_broken: Bool

nitc :: MEntity :: _is_broken

The indication that the entity did not pass some semantic verifications.
private var _is_fictive: Bool

nitc :: MEntity :: _is_fictive

Is self created for internal purpose?
private var _is_test: Bool

nitc :: MEntity :: _is_test

Is self created for unit testing purpose?
private var _issues_url: nullable String

nitc :: MPackage :: _issues_url

private var _license: nullable String

nitc :: MPackage :: _license

private var _location: Location

nitc :: MPackage :: _location

private var _maintainer: nullable String

nitc :: MPackage :: _maintainer

private var _mdoc: nullable MDoc

nitc :: MEntity :: _mdoc

The documentation associated to the entity
private var _metadata: MPackageMetadata

nitc :: MPackage :: _metadata

Metadata related to this package
private var _mexample: nullable MExample

nitc :: MEntity :: _mexample

Return this entity as a MExample
private var _mgroups: POSet[MGroup]

nitc :: MPackage :: _mgroups

The group tree, as a POSet
private var _model: Model

nitc :: MPackage :: _model

The model of the package
private var _name: String

nitc :: MPackage :: _name

The name of the package
private var _root: nullable MGroup

nitc :: MPackage :: _root

The root of the group tree
fun accept(filepath: String): Bool

nitc :: MPackage :: accept

Does the source inclusion/inclusion rules of the package ini accept such path?
protected fun accept_json_serializer(v: JsonSerializer)

serialization :: Serializable :: accept_json_serializer

Refinable service to customize the serialization of this class to JSON
protected fun accept_msgpack_attribute_counter(v: AttributeCounter)

serialization :: Serializable :: accept_msgpack_attribute_counter

Hook to customize the behavior of the AttributeCounter
protected fun accept_msgpack_serializer(v: MsgPackSerializer)

serialization :: Serializable :: accept_msgpack_serializer

Hook to customize the serialization of this class to MessagePack
private fun add_doc_to_infobox(res: HInfoBox)

nitc :: MEntity :: add_doc_to_infobox

Append an entry for the doc in the given infobox
protected fun add_to_bundle(bundle: NativeBundle, key: JavaString)

serialization :: Serializable :: add_to_bundle

Called by []= to dynamically choose the appropriate method according
private fun allowed_ini_keys=(allowed_ini_keys: Array[String])

nitc :: MPackage :: allowed_ini_keys=

fun api_url: String

nitc :: MEntity :: api_url

URL to self within the JSON api.
private fun browse_url: nullable String

nitc :: MPackage :: browse_url

private fun browse_url=(browse_url: nullable String)

nitc :: MPackage :: browse_url=

abstract fun c_name: String

nitc :: MEntity :: c_name

A fully-qualified C-like identifier of this model entity.
protected fun c_name=(c_name: String)

nitc :: MPackage :: c_name=

private fun check_ini(toolcontext: ToolContext)

nitc :: MPackage :: check_ini

private fun check_makefile(toolcontext: ToolContext, mainmodule: MModule)

nitc :: MPackage :: check_makefile

private fun check_man(toolcontext: ToolContext, mainmodule: MModule)

nitc :: MPackage :: check_man

private fun check_readme(toolcontext: ToolContext)

nitc :: MPackage :: check_readme

protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
fun collect_all_mgroups(filter: nullable ModelFilter): HashSet[MGroup]

nitc :: MPackage :: collect_all_mgroups

Collect all groups contained in self
fun collect_all_mmodules(filter: nullable ModelFilter): HashSet[MModule]

nitc :: MPackage :: collect_all_mmodules

Collect all modules contained in self
fun collect_ancestors(mainmodule: MModule, filter: nullable ModelFilter): Set[MENTITY]

nitc :: MEntity :: collect_ancestors

Collect self ancestors (direct and indirect)
abstract fun collect_children(mainmodule: MModule, filter: nullable ModelFilter): Set[MENTITY]

nitc :: MEntity :: collect_children

Collect self children (direct descendants)
fun collect_descendants(mainmodule: MModule, filter: nullable ModelFilter): Set[MENTITY]

nitc :: MEntity :: collect_descendants

Collect self descendants (direct and direct)
fun collect_intro_attributes(filter: nullable ModelFilter): Set[MAttribute]

nitc :: MPackage :: collect_intro_attributes

Collect all attributes introduced in self
fun collect_intro_inits(filter: nullable ModelFilter): Set[MMethod]

nitc :: MPackage :: collect_intro_inits

Collect all inits introduced in self
fun collect_intro_mclasses(filter: nullable ModelFilter): HashSet[MClass]

nitc :: MPackage :: collect_intro_mclasses

Collect all classes introduced in self
fun collect_intro_methods(filter: nullable ModelFilter): Set[MMethod]

nitc :: MPackage :: collect_intro_methods

Collect all methods introduced in self excluding inits
fun collect_intro_mproperties(filter: nullable ModelFilter): HashSet[MProperty]

nitc :: MPackage :: collect_intro_mproperties

Collect all properties introduced in self
fun collect_intro_vts(filter: nullable ModelFilter): Set[MVirtualTypeProp]

nitc :: MPackage :: collect_intro_vts

Collect all virtual types introduced in self
fun collect_linearization(mainmodule: MModule): nullable Array[MEntity]

nitc :: MEntity :: collect_linearization

Collect self linearization anchored on mainmodule
fun collect_mgroups(filter: nullable ModelFilter): HashSet[MGroup]

nitc :: MPackage :: collect_mgroups

Collect only groups contained in self.root
fun collect_mmodules(filter: nullable ModelFilter): HashSet[MModule]

nitc :: MPackage :: collect_mmodules

Collect only modules contained in self.root
fun collect_modifiers: Array[String]

nitc :: MEntity :: collect_modifiers

Collect modifier keywords like redef, private etc
abstract fun collect_parents(mainmodule: MModule, filter: nullable ModelFilter): Set[MENTITY]

nitc :: MEntity :: collect_parents

Collect self parents (direct ancestors)
fun collect_redef_mclasses(filter: nullable ModelFilter): Set[MClass]

nitc :: MPackage :: collect_redef_mclasses

Collect all classes redefined or refined in self
fun collect_redef_mproperties(filter: nullable ModelFilter): HashSet[MProperty]

nitc :: MPackage :: collect_redef_mproperties

Collect all properties redefined in self
fun color: String

nitc :: MEntity :: color

private fun complete_mdoc: nullable MDoc

nitc :: MEntity :: complete_mdoc

Doc to use in completion
private fun complete_name: String

nitc :: MEntity :: complete_name

Actual name used in completion
protected fun const_color=(const_color: String)

nitc :: MEntity :: const_color=

private fun contributors=(contributors: Array[String])

nitc :: MPackage :: contributors=

fun core_serialize_to(serializer: Serializer)

serialization :: Serializable :: core_serialize_to

Actual serialization of self to serializer
abstract fun create_ast_representation(astbuilder: nullable ASTBuilder): ANode

nitc :: MEntity :: create_ast_representation

Build a ANode from self
fun cs_comment(no_color: nullable Bool): nullable String

nitc :: MEntity :: cs_comment

Returns the comment of this MEntity formatted for console.
fun cs_declaration(no_color: nullable Bool): String

nitc :: MEntity :: cs_declaration

Returns the complete MEntity declaration (modifiers + name + signature).
fun cs_full_name(no_color: nullable Bool): String

nitc :: MEntity :: cs_full_name

Returns self.full_name formatted for console
fun cs_icon(no_color: nullable Bool): String

nitc :: MEntity :: cs_icon

Text icon to be displayed in front of the entity
fun cs_list_item(no_color: nullable Bool): String

nitc :: MEntity :: cs_list_item

Returns self as a list element that can be displayed in console.
fun cs_location(no_color: nullable Bool): String

nitc :: MEntity :: cs_location

Source code location of this MEntity formatted for console
fun cs_short_comment(no_color: nullable Bool): nullable String

nitc :: MEntity :: cs_short_comment

Returns the comment of this MEntity formatted for console.
fun cs_signature(no_color: nullable Bool): String

nitc :: MEntity :: cs_signature

Returns self signature formatted for console.
fun cs_source_code: String

nitc :: MEntity :: cs_source_code

Source code associated to this MEntity.
fun css_classes: Array[String]

nitc :: MEntity :: css_classes

CSS classes used to decorate self
protected fun css_classes=(css_classes: Array[String])

nitc :: MEntity :: css_classes=

CSS classes used to decorate self
init defaultinit(name: String, model: Model, location: Location)

nitc :: MPackage :: defaultinit

fun deprecation: nullable MDeprecationInfo

nitc :: MEntity :: deprecation

Is the entity deprecated?
fun deprecation=(deprecation: nullable MDeprecationInfo)

nitc :: MEntity :: deprecation=

Is the entity deprecated?
fun examples: Array[MExample]

nitc :: MEntity :: examples

Examples found for self
protected fun examples=(examples: Array[MExample])

nitc :: MEntity :: examples=

Examples found for self
fun excludes: nullable Array[String]

nitc :: MPackage :: excludes

Array of relative source paths excluded according to the source.exclude key of the ini
protected fun excludes=(excludes: nullable Array[String])

nitc :: MPackage :: excludes=

Array of relative source paths excluded according to the source.exclude key of the ini
private fun expand: String

nitc :: MPackage :: expand

Expand self in its own directory
init from_deserializer(deserializer: Deserializer)

serialization :: Serializable :: from_deserializer

Create an instance of this class from the deserializer
abstract fun full_name: String

nitc :: MEntity :: full_name

A fully-qualified name of this model entity.
private fun gen_ini: String

nitc :: MPackage :: gen_ini

private fun gen_makefile(model: Model, mainmodule: MModule): nullable String

nitc :: MPackage :: gen_makefile

private fun gen_man(toolcontext: ToolContext, mainmodule: MModule)

nitc :: MPackage :: gen_man

fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
private fun git_dir: nullable String

nitc :: MPackage :: git_dir

private fun git_dir=(git_dir: nullable String)

nitc :: MPackage :: git_dir=

private fun git_exec(cmd: String): nullable String

nitc :: MPackage :: git_exec

private fun git_url: nullable String

nitc :: MPackage :: git_url

private fun git_url=(git_url: nullable String)

nitc :: MPackage :: git_url=

fun has_ini: Bool

nitc :: MPackage :: has_ini

Does self have a ini file?
fun has_makefile: Bool

nitc :: MPackage :: has_makefile

Does self have a Makefile?
private fun has_man: Bool

nitc :: MPackage :: has_man

Does self have a manpage files?
fun has_readme: Bool

nitc :: MPackage :: has_readme

Does self have a README.md file?
fun has_source: Bool

nitc :: MPackage :: has_source

Does self have a source file?
fun hash: Int

core :: Object :: hash

The hash code of the object.
fun hierarchy_poset(mainmodule: MModule, filter: nullable ModelFilter): POSet[MENTITY]

nitc :: MEntity :: hierarchy_poset

Build a poset representing self in it's own hierarchy
private fun homepage_url: nullable String

nitc :: MPackage :: homepage_url

private fun homepage_url=(homepage_url: nullable String)

nitc :: MPackage :: homepage_url=

private fun href(v: NitlightVisitor): nullable String

nitc :: MEntity :: href

fun html_declaration: Template

nitc :: MEntity :: html_declaration

Returns the complete MEntity declaration decorated with HTML
fun html_full_name: String

nitc :: MEntity :: html_full_name

The MEntity full_name escaped for HTML
protected fun html_full_name=(html_full_name: String)

nitc :: MEntity :: html_full_name=

The MEntity full_name escaped for HTML
fun html_icon: BSIcon

nitc :: MEntity :: html_icon

An icon representative of the mentity
fun html_id: String

nitc :: MEntity :: html_id

The MEntity unique ID in the HTML output
protected fun html_id=(html_id: String)

nitc :: MEntity :: html_id=

The MEntity unique ID in the HTML output
fun html_name: String

nitc :: MEntity :: html_name

The MEntity name escaped for HTML
protected fun html_name=(html_name: String)

nitc :: MEntity :: html_name=

The MEntity name escaped for HTML
abstract fun html_namespace: Template

nitc :: MEntity :: html_namespace

Returns full_name decorated with HTML links
fun html_signature(short: nullable Bool): Template

nitc :: MEntity :: html_signature

Returns the MEntity signature decorated with HTML
fun html_url: String

nitc :: MEntity :: html_url

The MEntity URL in the HTML output
protected fun html_url=(html_url: String)

nitc :: MEntity :: html_url=

The MEntity URL in the HTML output
fun import_alias(root_name: String): nullable String

nitc :: MPackage :: import_alias

Get the name to search for, for a root_name declared as import in ini
private fun import_aliases_parsed=(import_aliases_parsed: nullable Map[String, ExternalPackage])

nitc :: MPackage :: import_aliases_parsed=

abstract fun infobox(v: HtmlightVisitor): HInfoBox

nitc :: HInfoBoxable :: infobox

An new infobox documenting the entity
fun ini: nullable IniFile

nitc :: MPackage :: ini

The associated .ini file, if any
protected fun ini=(ini: nullable IniFile)

nitc :: MPackage :: ini=

The associated .ini file, if any
fun ini_path: nullable String

nitc :: MPackage :: ini_path

The path to self ini file
init init

core :: Object :: init

fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
fun is_broken: Bool

nitc :: MEntity :: is_broken

The indication that the entity did not pass some semantic verifications.
fun is_broken=(is_broken: Bool)

nitc :: MEntity :: is_broken=

The indication that the entity did not pass some semantic verifications.
fun is_example: Bool

nitc :: MEntity :: is_example

Is self existing for an example purpose?
fun is_expanded: Bool

nitc :: MPackage :: is_expanded

Is self in its own directory?
fun is_fictive: Bool

nitc :: MEntity :: is_fictive

Is self created for internal purpose?
fun is_fictive=(is_fictive: Bool)

nitc :: MEntity :: is_fictive=

Is self created for internal purpose?
intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
fun is_test: Bool

nitc :: MEntity :: is_test

Is self created for unit testing purpose?
fun is_test=(is_test: Bool)

nitc :: MEntity :: is_test=

Is self created for unit testing purpose?
private fun issues_url: nullable String

nitc :: MPackage :: issues_url

private fun issues_url=(issues_url: nullable String)

nitc :: MPackage :: issues_url=

private fun jname: String

nitc :: MEntity :: jname

A Java compatible name for self
abstract fun json_namespace: JsonNamespace

nitc :: MEntity :: json_namespace

Return self.full_name as an object that can be serialized to json.
private fun license: nullable String

nitc :: MPackage :: license

private fun license=(license: nullable String)

nitc :: MPackage :: license=

fun linkto(v: HtmlightVisitor): HTMLTag

nitc :: MEntity :: linkto

A HTML version of to_s with hyper-links.
fun linkto_text(v: HtmlightVisitor, text: String): HTMLTag

nitc :: MEntity :: linkto_text

Link to the self with a specific text.
fun location: Location

nitc :: MEntity :: location

The origin of the definition.
protected fun location=(location: Location)

nitc :: MPackage :: location=

private fun maintainer: nullable String

nitc :: MPackage :: maintainer

private fun maintainer=(maintainer: nullable String)

nitc :: MPackage :: maintainer=

private fun make_node(nodes: HashMap[MEntity, NeoNode], model_name: nullable String): NeoNode

nitc :: MEntity :: make_node

Make a new NeoNode based on mentity.
fun makefile_path: nullable String

nitc :: MPackage :: makefile_path

The path to self Makefile
private fun man_path: nullable String

nitc :: MPackage :: man_path

The path to self manpage files
fun mdoc: nullable MDoc

nitc :: MEntity :: mdoc

The documentation associated to the entity
fun mdoc=(mdoc: nullable MDoc)

nitc :: MEntity :: mdoc=

The documentation associated to the entity
fun mdoc_or_fallback: nullable MDoc

nitc :: MEntity :: mdoc_or_fallback

The documentation associated to the entity or their main nested entity.
private fun mentity_kind_rank: Int

nitc :: MEntity :: mentity_kind_rank

Compare MEntity class kind
fun metadata: MPackageMetadata

nitc :: MPackage :: metadata

Metadata related to this package
protected fun metadata=(metadata: MPackageMetadata)

nitc :: MPackage :: metadata=

Metadata related to this package
fun mexample: nullable MExample

nitc :: MEntity :: mexample

Return this entity as a MExample
protected fun mexample=(mexample: nullable MExample)

nitc :: MEntity :: mexample=

Return this entity as a MExample
fun mgroups: POSet[MGroup]

nitc :: MPackage :: mgroups

The group tree, as a POSet
protected fun mgroups=(mgroups: POSet[MGroup])

nitc :: MPackage :: mgroups=

The group tree, as a POSet
abstract fun model: Model

nitc :: MEntity :: model

A Model Entity has a direct link to its model
protected fun model=(model: Model)

nitc :: MPackage :: model=

The model of the package
protected fun msgpack_extra_array_items: Int

serialization :: Serializable :: msgpack_extra_array_items

Hook to request a larger than usual metadata array
abstract fun name: String

nitc :: MEntity :: name

The short (unqualified) name of this model entity.
protected fun name=(name: String)

nitc :: MPackage :: name=

The name of the package
private intern fun native_class_name: CString

core :: Object :: native_class_name

The class name of the object in CString format.
abstract fun nitdoc_breadcrumbs: Array[MEntity]

nitc :: MEntity :: nitdoc_breadcrumbs

MEntities composing the breadcrumbs of a nitdoc page
protected fun nitdoc_breadcrumbs=(nitdoc_breadcrumbs: Array[MEntity])

nitc :: MPackage :: nitdoc_breadcrumbs=

intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
fun package_path: nullable String

nitc :: MPackage :: package_path

The path to self
abstract fun parent_concern: nullable MConcern

nitc :: MConcern :: parent_concern

The concern that contains self or null if self is the root of the concern hierarchy
fun ratings(config: NitwebConfig, user: nullable String): JsonObject

nitc :: MEntity :: ratings

Get the ratings of a mentity
fun ratings_by_dimension(config: NitwebConfig, dimension: String, user: nullable String): JsonObject

nitc :: MEntity :: ratings_by_dimension

Get the ratings of a dimension
fun readme_path: nullable String

nitc :: MPackage :: readme_path

The path to self README.md
fun root: nullable MGroup

nitc :: MPackage :: root

The root of the group tree
fun root=(root: nullable MGroup)

nitc :: MPackage :: root=

The root of the group tree
fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
fun serialize_msgpack(plain: nullable Bool): Bytes

serialization :: Serializable :: serialize_msgpack

Serialize self to MessagePack bytes
fun serialize_to(serializer: Serializer)

serialization :: Serializable :: serialize_to

Serialize self to serializer
fun serialize_to_json(plain: nullable Bool, pretty: nullable Bool): String

serialization :: Serializable :: serialize_to_json

Serialize self to JSON
private fun serialize_to_or_delay(v: Serializer)

serialization :: Serializable :: serialize_to_or_delay

Accept references or force direct serialization (using serialize_to)
private fun source_url(url_pattern: nullable String): String

nitc :: MEntity :: source_url

Render a HTML link for the MEntity location
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
fun to_dot_node: DotNode

nitc :: MEntity :: to_dot_node

Return self as a DotNode
fun to_json: String

serialization :: Serializable :: to_json

Serialize self to plain JSON
fun to_json_ref: MEntityRef

nitc :: MEntity :: to_json_ref

Return a new MEntityRef to self.
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

private fun to_node(nodes: HashMap[MEntity, NeoNode], model_name: nullable String): NeoNode

nitc :: MEntity :: to_node

Build a NeoNode representing self.
fun to_pretty_json: String

serialization :: Serializable :: to_pretty_json

Serialize self to plain pretty JSON
fun to_s: String

core :: Object :: to_s

User readable representation of self.
abstract fun tpl_class(model: UMLModel): Writable

nitc :: MEntity :: tpl_class

Generates a dot-compatible Writable UML Class diagram from self
abstract fun tpl_module(model: UMLModel): Writable

nitc :: MEntity :: tpl_module

Builds a dot UML package diagram entity from self
fun visibility: MVisibility

nitc :: MEntity :: visibility

The visibility of the MEntity.
fun visit_all(v: ModelVisitor)

nitc :: MEntity :: visit_all

Call v.enter_visit on all nested entities.
fun web_url: String

nitc :: MEntity :: web_url

URL to self within the web interface.
private fun write_doc(model: Model, mainmodule: MModule, stream: Writer)

nitc :: MEntity :: write_doc

private fun write_extra_doc(model: Model, mainmodule: MModule, stream: Writer)

nitc :: MEntity :: write_extra_doc

Extra auto documentation to append to the stream
private fun write_location(mainmodule: MModule, stream: Writer)

nitc :: MEntity :: write_location

Location (file and line when available) of related declarations
package_diagram nitc::MPackage MPackage nitc::MConcern MConcern nitc::MPackage->nitc::MConcern nitc::MEntity MEntity nitc::MConcern->nitc::MEntity ...nitc::MEntity ... ...nitc::MEntity->nitc::MEntity

Ancestors

interface HInfoBoxable

nitc :: HInfoBoxable

Model entity or whatever that can produce an infobox
abstract class MEntity

nitc :: MEntity

A named and possibly documented entity in the model.
interface Object

core :: Object

The root of the class hierarchy.
interface Serializable

serialization :: Serializable

Instances of this class can be passed to Serializer::serialize

Parents

abstract class MConcern

nitc :: MConcern

Something that represents a concern

Class definitions

nitc $ MPackage
# A Nit package, that encompass a product
class MPackage
	super MConcern

	# The name of the package
	redef var name

	redef fun full_name do return name

	redef var c_name = name.to_cmangle is lazy

	# The model of the package
	redef var model

	redef var location

	# The root of the group tree
	var root: nullable MGroup = null is writable

	# The group tree, as a POSet
	var mgroups = new POSet[MGroup]

	redef fun to_s do return name

	init
	do
		model.mpackages.add(self)
		# Add `self` to the importation graph
		model.mpackage_importation_graph.add_vertex(self)
		model.mpackage_by_name.add_one(name, self)
	end

	# MPackage are always roots of the concerns hierarchy
	redef fun parent_concern do return null

	redef fun mdoc_or_fallback
	do
		var mdoc = self.mdoc
		if mdoc != null then return mdoc
		var root = self.root
		if root != null then return root.mdoc_or_fallback
		return null
	end

	# Does `self` have a source file?
	fun has_source: Bool do return location.file != null

	# The path to `self`
	fun package_path: nullable String do
		if not has_source then return null
		return location.file.as(not null).filename
	end

	# Is `self` in its own directory?
	fun is_expanded: Bool do
		var path = package_path
		if path == null then return false
		return not path.has_suffix(".nit")
	end

	# The path to `self` ini file
	fun ini_path: nullable String do
		var path = package_path
		if path == null then return null
		if is_expanded then return path / "package.ini"
		return path.dirname / "{name}.ini"
	end

	# Does `self` have a ini file?
	fun has_ini: Bool do
		var ini_path = self.ini_path
		if ini_path == null then return false
		return ini_path.file_exists
	end

	# The path to `self` README.md
	fun readme_path: nullable String do
		var path = package_path
		if path == null then return null
		if not is_expanded then return null
		return path / "README.md"
	end

	# Does `self` have a README.md file?
	fun has_readme: Bool do
		var readme_path = self.readme_path
		if readme_path == null then return false
		return readme_path.file_exists
	end
end
src/model/mpackage.nit:24,1--113,3

nitc :: loader $ MPackage
redef class MPackage
	# The associated `.ini` file, if any
	#
	# The `ini` file is given as is and might contain invalid or missing information.
	#
	# Some packages, like stand-alone packages or virtual packages have no `ini` file associated.
	var ini: nullable IniFile = null

	# Array of relative source paths excluded according to the `source.exclude` key of the `ini`
	var excludes: nullable Array[String] is lazy do
		var ini = self.ini
		if ini == null then return null
		var exclude = ini["source.exclude"]
		if exclude == null then return null
		var excludes = exclude.split(":")
		return excludes
	end

	# Does the source inclusion/inclusion rules of the package `ini` accept such path?
	fun accept(filepath: String): Bool
	do
		var excludes = self.excludes
		if excludes != null then
			var relpath = root.filepath.relpath(filepath)
			if excludes.has(relpath) then return false
		end
		return true
	end

	# Get the name to search for, for a `root_name` declared as `import` in `ini`
	fun import_alias(root_name: String): nullable String
	do
		var map = import_aliases_parsed
		if map == null then return null

		var val = map.get_or_null(root_name)
		if val == null then return null

		return val.dir_name
	end

	private var import_aliases_parsed: nullable Map[String, ExternalPackage] is lazy do
		var ini = ini
		if ini == null then return null

		var import_line = ini["package.import"]
		if import_line == null then return null

		var map = import_line.parse_import
		if map.is_empty then return null

		return map
	end
end
src/loader.nit:1175,1--1228,3

nitc :: model_examples $ MPackage
redef class MPackage
	redef fun examples do
		var res = super
		for mgroup in mgroups do
			for example in mgroup.examples do
				if not res.has(example) then res.add example
			end
		end
		return res
	end
end
src/model/model_examples.nit:61,1--71,3

nitc :: neo $ MPackage
redef class MPackage
	redef fun to_node(nodes: HashMap[MEntity, NeoNode], model_name: nullable String): NeoNode do
		if nodes.has_key(self) then return nodes[self]
		var node = super
		var root = root
		if root != null then
			node.out_edges.add(new NeoEdge(node, "ROOT", root.to_node(nodes, model_name)))
		end
		return node
	end
end
src/neo.nit:685,1--695,3

nitc :: catalog $ MPackage
redef class MPackage

	# Metadata related to this package
	var metadata = new MPackageMetadata(self)
end
src/catalog/catalog.nit:55,1--59,3

nitc :: model_collect $ MPackage
redef class MPackage

	redef fun collect_modifiers do return super + ["package"]

	# Collect all packages directly imported by `self`
	redef fun collect_parents(mainmodule, filter) do
		var res = new HashSet[MENTITY]
		for mgroup in mgroups do
			for parent in mgroup.collect_parents(mainmodule, filter) do
				var mpackage = parent.mpackage
				if mpackage == self then continue
				if filter == null or filter.accept_mentity(mpackage) then res.add(mpackage)
			end
		end
		return res
	end

	# Collect all packages that directly depends on `self`
	redef fun collect_children(mainmodule, filter) do
		var res = new HashSet[MENTITY]
		for mpackage in model.collect_mpackages(filter) do
			if mpackage.collect_parents(mainmodule, filter).has(self) then res.add mpackage
		end
		return res
	end

	# Collect all groups contained in `self`
	fun collect_all_mgroups(filter: nullable ModelFilter): HashSet[MGroup] do
		var res = new HashSet[MGroup]
		for mgroup in mgroups do
			if filter == null or filter.accept_mentity(mgroup) then res.add(mgroup)
		end
		return res
	end

	# Collect only groups contained in `self.root`
	fun collect_mgroups(filter: nullable ModelFilter): HashSet[MGroup] do
		var res = new HashSet[MGroup]
		var root = self.root
		if root == null then return res
		res.add_all root.collect_mgroups(filter)
		return res
	end

	# Collect all modules contained in `self`
	fun collect_all_mmodules(filter: nullable ModelFilter): HashSet[MModule] do
		var res = new HashSet[MModule]
		for mgroup in collect_all_mgroups(filter) do
			res.add_all mgroup.collect_mmodules(filter)
		end
		return res
	end

	# Collect only modules contained in `self.root`
	fun collect_mmodules(filter: nullable ModelFilter): HashSet[MModule] do
		var res = new HashSet[MModule]
		var root = self.root
		if root == null then return res
		res.add_all root.collect_mmodules(filter)
		return res
	end

	# Collect all classes introduced in `self`
	fun collect_intro_mclasses(filter: nullable ModelFilter): HashSet[MClass] do
		var res = new HashSet[MClass]
		for mgroup in mgroups do
			for mmodule in collect_all_mmodules(filter) do
				res.add_all mmodule.collect_intro_mclasses(filter)
			end
		end
		return res
	end

	# Collect all classes redefined or refined in `self`
	fun collect_redef_mclasses(filter: nullable ModelFilter): Set[MClass] do
		var res = new HashSet[MClass]
		for mgroup in mgroups do
			for mmodule in collect_all_mmodules(filter) do
				res.add_all mmodule.collect_redef_mclasses(filter)
			end
		end
		return res
	end

	# Collect all properties introduced in `self`
	fun collect_intro_mproperties(filter: nullable ModelFilter): HashSet[MProperty] do
		var res = new HashSet[MProperty]
		for mgroup in mgroups do
			for mmodule in collect_all_mmodules(filter) do
				res.add_all mmodule.collect_intro_mproperties(filter)
			end
		end
		return res
	end

	# Collect all properties redefined in `self`
	fun collect_redef_mproperties(filter: nullable ModelFilter): HashSet[MProperty] do
		var res = new HashSet[MProperty]
		for mgroup in mgroups do
			for mmodule in collect_all_mmodules(filter) do
				res.add_all mmodule.collect_redef_mproperties(filter)
			end
		end
		return res
	end

	# Collect all attributes introduced in `self`
	fun collect_intro_attributes(filter: nullable ModelFilter): Set[MAttribute] do
		var res = new HashSet[MAttribute]
		for mgroup in mgroups do
			for mmodule in collect_all_mmodules(filter) do
				res.add_all mmodule.collect_intro_attributes(filter)
			end
		end
		return res
	end

	# Collect all inits introduced in `self`
	fun collect_intro_inits(filter: nullable ModelFilter): Set[MMethod] do
		var res = new HashSet[MMethod]
		for mgroup in mgroups do
			for mmodule in collect_all_mmodules(filter) do
				res.add_all mmodule.collect_intro_inits(filter)
			end
		end
		return res
	end

	# Collect all methods introduced in `self` excluding inits
	#
	# See `collect_intro_inits`.
	fun collect_intro_methods(filter: nullable ModelFilter): Set[MMethod] do
		var res = new HashSet[MMethod]
		for mgroup in mgroups do
			for mmodule in collect_all_mmodules(filter) do
				res.add_all mmodule.collect_intro_methods(filter)
			end
		end
		return res
	end

	# Collect all virtual types introduced in `self`
	fun collect_intro_vts(filter: nullable ModelFilter): Set[MVirtualTypeProp] do
		var res = new HashSet[MVirtualTypeProp]
		for mgroup in mgroups do
			for mmodule in collect_all_mmodules(filter) do
				res.add_all mmodule.collect_intro_vts(filter)
			end
		end
		return res
	end
end
src/model/model_collect.nit:266,1--417,3

nitc :: model_visitor $ MPackage
redef class MPackage
	# Visit the root group of the package.
	redef fun visit_all(v) do
		v.enter_visit(root)
	end
end
src/model/model_visitor.nit:113,1--118,3

nitc :: model_index $ MPackage
redef class MPackage
	redef fun mentity_kind_rank do return 1
end
src/model/model_index.nit:646,1--648,3

nitc :: nitpackage $ MPackage
redef class MPackage

	# Expand `self` in its own directory
	private fun expand: String do
		assert not is_expanded

		var ori_path = package_path.as(not null)
		var new_path = ori_path.dirname / name

		new_path.mkdir
		sys.system "mv {ori_path} {new_path / name}.nit"

		var ini_file = "{new_path}.ini"
		if ini_file.file_exists then
			sys.system "mv {new_path}.ini {new_path}/package.ini"
		end

		return new_path
	end

	private var maintainer: nullable String is lazy do
		return git_exec("git shortlog -esn . | head -n 1 | sed 's/\\s*[0-9]*\\s*//'")
	end

	private var contributors: Array[String] is lazy do
		var contribs = git_exec("git shortlog -esn . | head -n -1 | " +
			"sed 's/\\s*[0-9]*\\s*//'")
		if contribs == null then return new Array[String]
		return contribs.split("\n")
	end

	private var git_url: nullable String is lazy do
		var git = git_exec("git remote get-url origin")
		if git == null then return null
		git = git.replace("git@github.com:", "https://github.com/")
		git = git.replace("git@gitlab.com:", "https://gitlab.com/")
		return git
	end

	private var git_dir: nullable String is lazy do
		return git_exec("git rev-parse --show-prefix")
	end

	private var browse_url: nullable String is lazy do
		var git = git_url
		if git == null then return null
		var browse = git.replace(".git", "")
		var dir = git_dir
		if dir == null or dir.is_empty then return browse
		return "{browse}/tree/master/{dir}"
	end

	private var homepage_url: nullable String is lazy do
		var git = git_url
		if git == null then return null
		# Special case for nit files
		if git.has_suffix("/nit.git") then
			return "http://nitlanguage.org"
		end
		return git.replace(".git", "")
	end

	private var issues_url: nullable String is lazy do
		var git = git_url
		if git == null then return null
		return "{git.replace(".git", "")}/issues"
	end

	private var license: nullable String is lazy do
		var git = git_url
		if git == null then return null
		# Special case for nit files
		if git.has_suffix("/nit.git") then
			return "Apache-2.0"
		end
		return null
	end

	private fun git_exec(cmd: String): nullable String do
		var path = package_path
		if path == null then return null
		if not is_expanded then path = path.dirname
		with pr = new ProcessReader("sh", "-c", "cd {path} && {cmd}") do
			return pr.read_all.trim
		end
	end

	private var allowed_ini_keys = [
		"package.name", "package.desc", "package.tags", "package.license",
		"package.maintainer", "package.more_contributors",
		"upstream.browse", "upstream.git", "upstream.git.directory",
		"upstream.homepage", "upstream.issues", "upstream.apk", "upstream.tryit",
		"source.exclude"
		]

	private fun check_ini(toolcontext: ToolContext) do
		if not has_ini then
			toolcontext.error(location, "No `package.ini` file for `{name}`")
			return
		end

		var pkg_path = package_path
		if pkg_path == null then return

		var ini_path = ini_path
		if ini_path == null then return

		var ini = new IniFile.from_file(ini_path)

		ini.check_key(ini_path, toolcontext, self, "package.name", name)
		ini.check_key(ini_path, toolcontext, self, "package.desc")
		ini.check_key(ini_path, toolcontext, self, "package.tags")

		# FIXME since `git reflog --follow` seems bugged
		ini.check_key(ini_path, toolcontext, self, "package.maintainer")
		# var maint = mpackage.maintainer
		# if maint != null then
			# ini.check_key(toolcontext, self, "package.maintainer", maint)
		# end

		# FIXME since `git reflog --follow` seems bugged
		# var contribs = mpackage.contributors
		# if contribs.not_empty then
			# ini.check_key(toolcontext, self, "package.more_contributors", contribs.join(", "))
		# end

		ini.check_key(ini_path, toolcontext, self, "package.license", license)
		ini.check_key(ini_path, toolcontext, self, "upstream.browse", browse_url)
		ini.check_key(ini_path, toolcontext, self, "upstream.git", git_url)
		ini.check_key(ini_path, toolcontext, self, "upstream.git.directory", git_dir)
		ini.check_key(ini_path, toolcontext, self, "upstream.homepage", homepage_url)
		ini.check_key(ini_path, toolcontext, self, "upstream.issues", issues_url)

		for key in ini.flatten.keys do
			if not allowed_ini_keys.has(key) then
				toolcontext.warning(location, "unknown-ini-key",
					"Warning: ignoring unknown `{key}` key in `{ini_path}`")
			end
		end
	end

	private fun gen_ini: String do
		var ini_path = self.ini_path.as(not null)
		var ini = new IniFile.from_file(ini_path)

		ini.update_value("package.name", name)
		ini.update_value("package.desc", "")
		ini.update_value("package.tags", "")
		ini.update_value("package.maintainer", maintainer)
		ini.update_value("package.more_contributors", contributors.join(","))
		ini.update_value("package.license", license or else "")

		ini.update_value("upstream.browse", browse_url)
		ini.update_value("upstream.git", git_url)
		ini.update_value("upstream.git.directory", git_dir)
		ini.update_value("upstream.homepage", homepage_url)
		ini.update_value("upstream.issues", issues_url)

		ini.write_to_file(ini_path)
		return ini_path
	end

	# Makefile

	# The path to `self` Makefile
	fun makefile_path: nullable String do
		var path = package_path
		if path == null then return null
		if not is_expanded then return null
		return path / "Makefile"
	end

	# Does `self` have a Makefile?
	fun has_makefile: Bool do
		var makefile_path = self.makefile_path
		if makefile_path == null then return false
		return makefile_path.file_exists
	end

	private fun check_makefile(toolcontext: ToolContext, mainmodule: MModule) do
		var model = toolcontext.modelbuilder.model
		var filter = new ModelFilter(accept_example = false, accept_test = false)

		var cmd_bin = new CmdMains(model, filter, mentity = self)
		var res_bin = cmd_bin.init_command
		if not res_bin isa CmdSuccess then return

		for mmodule in cmd_bin.results.as(not null) do
			if not mmodule isa MModule then continue

			if mmodule.makefile_path == null then
				toolcontext.warning(location, "missing-makefile",
					"Warning: no Makefile for executable module `{mmodule.full_name}`")
			end
		end
	end

	private fun gen_makefile(model: Model, mainmodule: MModule): nullable String do
		var filter = new ModelFilter(accept_example = false, accept_test = false)

		var pkg_path = package_path.as(not null)
		var makefile_path = makefile_path.as(not null)

		var bins = new Array[String]
		var cmd_bin = new CmdMains(model, filter, mentity = self)
		var res_bin = cmd_bin.init_command
		if res_bin isa CmdSuccess then
			for mmodule in cmd_bin.results.as(not null) do
				if not mmodule isa MModule then continue
				var mmodule_makefile = mmodule.makefile_path
				if mmodule_makefile != null and mmodule_makefile != makefile_path then continue

				var file = mmodule.location.file
				if file == null then continue
				# Remove package path prefix
				var bin_path = file.filename
				if pkg_path.has_suffix("/") then
					bin_path = bin_path.replace(pkg_path, "")
				else
					bin_path = bin_path.replace("{pkg_path}/", "")
				end
				bins.add bin_path
			end
		end

		if  bins.is_empty then return null

		var make = new NitMakefile(bins)
		make.render.write_to_file(makefile_path)
		return makefile_path
	end

	# Manpages

	# The path to `self` manpage files
	private fun man_path: nullable String do
		var path = package_path
		if path == null then return null
		if not is_expanded then return null
		return path / "man"
	end

	# Does `self` have a manpage files?
	private fun has_man: Bool do
		var man_path = self.man_path
		if man_path == null then return false
		return man_path.file_exists
	end

	private fun check_man(toolcontext: ToolContext, mainmodule: MModule) do
		var model = toolcontext.modelbuilder.model
		var filter = new ModelFilter(accept_example = false, accept_test = false)
		var cmd = new CmdMains(model, filter, mentity = self)
		var res = cmd.init_command
		if not res isa CmdSuccess then return

		for mmodule in cmd.results.as(not null) do
			if not mmodule isa MModule then continue
			mmodule.check_man(toolcontext)
		end
	end

	private fun gen_man(toolcontext: ToolContext, mainmodule: MModule) do
		var model = toolcontext.modelbuilder.model
		var filter = new ModelFilter(accept_example = false, accept_test = false)
		var cmd = new CmdMains(model, filter, mentity = self)
		var res = cmd.init_command
		if not res isa CmdSuccess then return

		var pkg_man = man_path.as(not null)
		for mmodule in cmd.results.as(not null) do
			if not mmodule isa MModule then continue
			if not has_man then pkg_man.mkdir
			mmodule.gen_man(toolcontext)
		end
	end

	# README

	private fun check_readme(toolcontext: ToolContext) do
		if not has_readme then
			toolcontext.error(location, "No `README.md` file for `{name}`")
			return
		end
	end
end
src/nitpackage.nit:149,1--434,3

nitc :: commands_graph $ MPackage
redef class MPackage
	redef fun to_dot_node do
		var node = super
		node["shape"] = "tab"
		return node
	end
end
src/doc/commands/commands_graph.nit:369,1--375,3

nitc :: html_model $ MPackage
redef class MPackage
	redef fun html_namespace do return html_link
	redef fun html_icon do return new BSIcon("book", ["text-muted"])
	redef var css_classes = ["public"]
end
src/doc/templates/html_model.nit:98,1--102,3

nitc :: json_model $ MPackage
redef class MPackage
	redef fun core_serialize_to(v) do
		super

		var metadata = self.metadata
		if metadata.license != null then
			v.serialize_attribute("license", metadata.license)
		end
		if metadata.maintainers.not_empty then
			v.serialize_attribute("maintainer", metadata.maintainers.first)
		end
		if metadata.tags.not_empty then
			v.serialize_attribute("tags", metadata.tags)
		end
	end

	redef fun json_namespace do
		var ns = new JsonNamespace
		ns.add to_json_ref
		return ns
	end
end
src/doc/templates/json_model.nit:95,1--116,3

nitc :: static_base $ MPackage
redef class MPackage
	redef var nitdoc_breadcrumbs = [self: MEntity] is lazy
end
src/doc/static/static_base.nit:249,1--251,3

nitc :: static_html $ MPackage
redef class MPackage
	redef var html_url is lazy do return "package_{super}"
end
src/doc/static/static_html.nit:376,1--378,3

nitc :: api_metrics $ MPackage
redef class MPackage
	redef fun collect_metrics(h) do
		var mclasses = new HashSet[MClass]
		for mgroup in self.mgroups do
			for mmodule in mgroup.mmodules do mclasses.add_all mmodule.intro_mclasses
		end

		var mclasses_metrics = h.mclasses_metrics
		mclasses_metrics.collect(new HashSet[MClass].from(mclasses))

		var mmodules = new HashSet[MModule]
		for mgroup in self.mgroups do
			mmodules.add_all mgroup.mmodules
		end

		var mmodules_metrics = h.mmodules_metrics
		mmodules_metrics.collect(new HashSet[MModule].from(mmodules))

		var metrics = new JsonObject
		metrics["mclasses"] = mclasses_metrics
		metrics["mmodules"] = mmodules_metrics
		return metrics
	end
end
src/doc/api/api_metrics.nit:83,1--106,3