Build the linearization panel

Property definitions

nitc :: static_structure $ PageMEntity :: build_linearization
	# Build the linearization panel
	fun build_linearization(doc: DocModel) do
		var summary = new CardSummary

		var lq = new CmdLinearization(doc.model, doc.mainmodule, doc.filter, mentity)
		lq.init_command

		var mentities = lq.results
		if mentities == null then return

		if mentity isa MClass or mentity isa MClassDef then
			if mentity.name == "Object" then return # No linearization for `Object`
			if mentity.name == "Sys" then return # No linearization for `Sys`
			var section = new CardSection(2, "Class definitions")
			lin_tab.content.add section
			summary.cards.add section
		else if mentity isa MProperty or mentity isa MPropDef then
			if mentity.name == "init" then return # No linearization for `init`
			if mentity.name == "SELF" then return # No linearization for `SELF`
			if mentity.name == "to_s" then return # No linearization for `to_s`
			var section = new CardSection(2, "Property definitions")
			lin_tab.content.add section
			summary.cards.add section
		end

		var list = new CardLinearizationList(mentity)
		for m in mentities do
			var url = mentity.source_url(doc.code_url)
			var node = doc.modelbuilder.mentity2node(m)
			if node == null then continue
			if doc.no_code then node = null
			if m == mentity or
			  (m isa MClassDef and m.is_intro) or
			  (m isa MPropDef and m.is_intro) then
				var card = new CardLinearizationDef(m, node, is_active = true, url)
				list.cards.add card
				summary.cards.add card
			else
				var card = new CardLinearizationDef(m, node, is_active = false, url)
				list.cards.add card
				summary.cards.add card
			end
		end
		lin_tab.content.add list

		if summary.cards.not_empty then
			lin_tab.sidebar.cards.add summary
		end
	end
src/doc/static/static_structure.nit:179,2--227,4