summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2017-01-26 17:50:16 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2017-01-26 17:52:00 +0100
commit995b1e480c84fd356fb89039dbc67db599a423cc (patch)
tree6e0262028ea5753234b4692903b201efc1aa003e
parentff8688e169ac26dfa77bfe1445a1e3afa4ab0d5a (diff)
docgen: link to the method an overriden one overrides
-rw-r--r--src/scripts/elua/apps/gendoc.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/scripts/elua/apps/gendoc.lua b/src/scripts/elua/apps/gendoc.lua
index 19ee12298c..a184853aa0 100644
--- a/src/scripts/elua/apps/gendoc.lua
+++ b/src/scripts/elua/apps/gendoc.lua
@@ -1001,6 +1001,20 @@ find_parent_doc = function(fulln, cl, ftype)
1001 return pdoc 1001 return pdoc
1002end 1002end
1003 1003
1004local write_inherited_from = function(f, impl, cl, over)
1005 if not over then
1006 return
1007 end
1008 local buf = writer.Buffer()
1009 buf:write_raw("Overridden from ")
1010 local pimpl, pcl = find_parent_impl(impl:full_name_get(), cl)
1011 buf:write_link(
1012 impl:function_get():nspaces_get(pcl, true), impl:full_name_get()
1013 )
1014 buf:write_raw(".")
1015 f:write_i(buf:finish())
1016end
1017
1004build_method = function(impl, cl) 1018build_method = function(impl, cl)
1005 local over = impl:is_overridden(cl) 1019 local over = impl:is_overridden(cl)
1006 local fn = impl:function_get() 1020 local fn = impl:function_get()
@@ -1008,6 +1022,8 @@ build_method = function(impl, cl)
1008 local f = writer.Writer(mns, cl:full_name_get() .. "." .. fn:name_get()) 1022 local f = writer.Writer(mns, cl:full_name_get() .. "." .. fn:name_get())
1009 stats.check_method(fn, cl) 1023 stats.check_method(fn, cl)
1010 1024
1025 write_inherited_from(f, impl, cl, over)
1026
1011 local doc = impl:doc_get(fn.METHOD) 1027 local doc = impl:doc_get(fn.METHOD)
1012 if over and not doc:exists() then 1028 if over and not doc:exists() then
1013 doc = find_parent_doc(impl:full_name_get(), cl, fn.METHOD) 1029 doc = find_parent_doc(impl:full_name_get(), cl, fn.METHOD)
@@ -1044,6 +1060,8 @@ build_property = function(impl, cl)
1044 local pns = fn:nspaces_get(cl) 1060 local pns = fn:nspaces_get(cl)
1045 local f = writer.Writer(pns, cl:full_name_get() .. "." .. fn:name_get()) 1061 local f = writer.Writer(pns, cl:full_name_get() .. "." .. fn:name_get())
1046 1062
1063 write_inherited_from(f, impl, cl, over)
1064
1047 local isget = impl:is_prop_get() 1065 local isget = impl:is_prop_get()
1048 local isset = impl:is_prop_set() 1066 local isset = impl:is_prop_set()
1049 1067