summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Williams <andy@andywilliams.me>2017-12-12 11:37:07 +0000
committerAndy Williams <andy@andywilliams.me>2017-12-12 16:35:20 +0000
commit7fa99824a0c9858f0bdd41405471f54b335930f5 (patch)
treef972bf759124187f3c127ff9880afda1d8607806
parente4d5528e344bd18a635b2ef1876917d962fc724b (diff)
docs: Reverse the described relationships in our API docs site
This means that "<ns><method> [Overridden from <parentns>]" is preferred to "<parentns><method> [Overridden in <ns>]". This also means that "Overriden here" becomes "Overridden from <parentns>"
-rw-r--r--src/scripts/elua/apps/gendoc.lua18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/scripts/elua/apps/gendoc.lua b/src/scripts/elua/apps/gendoc.lua
index 4e3971a0cf..2f2f4cad9c 100644
--- a/src/scripts/elua/apps/gendoc.lua
+++ b/src/scripts/elua/apps/gendoc.lua
@@ -712,7 +712,7 @@ local build_functable = function(f, tcl, tbl, newm)
712 local cl, impl = unpack(implt) 712 local cl, impl = unpack(implt)
713 local ocl = impl:class_get() 713 local ocl = impl:class_get()
714 if not newm then 714 if not newm then
715 lbuf:write_link(ocl:nspaces_get(true), ocl:full_name_get()) 715 lbuf:write_link(cl:nspaces_get(true), cl:full_name_get())
716 lbuf:write_raw(".") 716 lbuf:write_raw(".")
717 end 717 end
718 718
@@ -740,15 +740,9 @@ local build_functable = function(f, tcl, tbl, newm)
740 -- TODO: possibly also mention which part of a property was 740 -- TODO: possibly also mention which part of a property was
741 -- overridden and where, get/set override point might differ! 741 -- overridden and where, get/set override point might differ!
742 -- but we get latest doc every time so it's ok for now 742 -- but we get latest doc every time so it's ok for now
743 lbuf:write_raw(" ")
744 local llbuf = writer.Buffer() 743 local llbuf = writer.Buffer()
745 llbuf:write_raw("[Overridden") 744 llbuf:write_raw(" [Overridden from ")
746 if cl ~= tcl then 745 llbuf:write_link(ocl:nspaces_get(true), ocl:full_name_get())
747 llbuf:write_raw(" in ")
748 llbuf:write_link(cl:nspaces_get(true), cl:full_name_get())
749 else
750 llbuf:write_raw(" here")
751 end
752 llbuf:write_raw("]") 746 llbuf:write_raw("]")
753 lbuf:write_i(llbuf:finish()) 747 lbuf:write_i(llbuf:finish())
754 end 748 end
@@ -1026,11 +1020,7 @@ local build_class = function(cl)
1026 for i, impl in ipairs(cl:implements_get()) do 1020 for i, impl in ipairs(cl:implements_get()) do
1027 local func = impl:function_get() 1021 local func = impl:function_get()
1028 written[func:id_get()] = true 1022 written[func:id_get()] = true
1029 if impl:is_overridden(cl) then 1023 meths[#meths + 1] = { cl, impl }
1030 omeths[#omeths + 1] = { cl, impl }
1031 else
1032 meths[#meths + 1] = { cl, impl }
1033 end
1034 end 1024 end
1035 find_callables(cl, omeths, ievs, written) 1025 find_callables(cl, omeths, ievs, written)
1036 1026