forked from enlightenment/efl
docgen: link to the method an overriden one overrides
This commit is contained in:
parent
ff8688e169
commit
995b1e480c
|
@ -1001,6 +1001,20 @@ find_parent_doc = function(fulln, cl, ftype)
|
||||||
return pdoc
|
return pdoc
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local write_inherited_from = function(f, impl, cl, over)
|
||||||
|
if not over then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local buf = writer.Buffer()
|
||||||
|
buf:write_raw("Overridden from ")
|
||||||
|
local pimpl, pcl = find_parent_impl(impl:full_name_get(), cl)
|
||||||
|
buf:write_link(
|
||||||
|
impl:function_get():nspaces_get(pcl, true), impl:full_name_get()
|
||||||
|
)
|
||||||
|
buf:write_raw(".")
|
||||||
|
f:write_i(buf:finish())
|
||||||
|
end
|
||||||
|
|
||||||
build_method = function(impl, cl)
|
build_method = function(impl, cl)
|
||||||
local over = impl:is_overridden(cl)
|
local over = impl:is_overridden(cl)
|
||||||
local fn = impl:function_get()
|
local fn = impl:function_get()
|
||||||
|
@ -1008,6 +1022,8 @@ build_method = function(impl, cl)
|
||||||
local f = writer.Writer(mns, cl:full_name_get() .. "." .. fn:name_get())
|
local f = writer.Writer(mns, cl:full_name_get() .. "." .. fn:name_get())
|
||||||
stats.check_method(fn, cl)
|
stats.check_method(fn, cl)
|
||||||
|
|
||||||
|
write_inherited_from(f, impl, cl, over)
|
||||||
|
|
||||||
local doc = impl:doc_get(fn.METHOD)
|
local doc = impl:doc_get(fn.METHOD)
|
||||||
if over and not doc:exists() then
|
if over and not doc:exists() then
|
||||||
doc = find_parent_doc(impl:full_name_get(), cl, fn.METHOD)
|
doc = find_parent_doc(impl:full_name_get(), cl, fn.METHOD)
|
||||||
|
@ -1044,6 +1060,8 @@ build_property = function(impl, cl)
|
||||||
local pns = fn:nspaces_get(cl)
|
local pns = fn:nspaces_get(cl)
|
||||||
local f = writer.Writer(pns, cl:full_name_get() .. "." .. fn:name_get())
|
local f = writer.Writer(pns, cl:full_name_get() .. "." .. fn:name_get())
|
||||||
|
|
||||||
|
write_inherited_from(f, impl, cl, over)
|
||||||
|
|
||||||
local isget = impl:is_prop_get()
|
local isget = impl:is_prop_get()
|
||||||
local isset = impl:is_prop_set()
|
local isset = impl:is_prop_set()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue