Location (file and line when available) of related declarations

Property definitions

nitc :: vim_autocomplete $ MEntity :: write_location
	# Location (file and line when available) of related declarations
	private fun write_location(mainmodule: MModule, stream: Writer)
	do
		for i in 2.times do stream.write line_separator
		stream.write "## Location"
		stream.write line_separator
		stream.write "* {location}"
	end
src/doc/vim_autocomplete.nit:101,2--108,4

nitc :: vim_autocomplete $ MClassType :: write_location
	redef fun write_location(mainmodule, stream)
	do
		for i in 2.times do stream.write line_separator
		stream.write "## Location of introduction and refinements"
		for c in mclass.mclassdefs do
			stream.write line_separator
			stream.write "* {c.location}"
		end
	end
src/doc/vim_autocomplete.nit:244,2--252,4

nitc :: vim_autocomplete $ MMethodDef :: write_location
	redef fun write_location(mainmodule, stream)
	do
		for i in 2.times do stream.write line_separator
		stream.write "## Location of introduction and refinements"

		# Group locations in the same file
		var file_to_location = new MultiHashMap[nullable SourceFile, Location]
		for c in mproperty.mpropdefs do
			file_to_location[c.location.file].add c.location
		end

		# Write one file per location
		for file, locations in file_to_location do
			var l = locations.first
			stream.write line_separator
			stream.write "* {l}"
			if locations.length > 1 then stream.write " ({locations.length-1} more)"
		end
	end
src/doc/vim_autocomplete.nit:120,2--138,4