q66 pushed a commit to branch master.

http://git.enlightenment.org/tools/edocgen.git/commit/?id=bce5c8619760366dedc8edc35e7f782c03dacc29

commit bce5c8619760366dedc8edc35e7f782c03dacc29
Author: Daniel Kolesa <d.kol...@samsung.com>
Date:   Thu Feb 6 15:02:03 2020 +0100

    add titles pointing back to the class for properties/methods
    
    We should add those to other class members as well, like events.
    Those are rendered using the template system though, so it will
    need a bit more work.
---
 gendoc.lua | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gendoc.lua b/gendoc.lua
index 0e6b6c0..e28d130 100644
--- a/gendoc.lua
+++ b/gendoc.lua
@@ -556,6 +556,14 @@ local write_inherited_from = function(f, impl, cl, prop)
     f:write_i(buf:finish())
 end
 
+local write_back = function(f, cl)
+    local buf = writer.Buffer()
+    buf:write_raw("Belongs to ")
+    buf:write_link(eoutils.obj_nspaces_get(cl, true), cl:name_get(), 
cl:is_beta())
+    buf:write_raw(".")
+    f:write_i(buf:finish())
+end
+
 local write_ilist = function(f, impl, cl)
     f:write_raw(template.compile("templates/include/impls.txt")({
         doc = docm, eoutils = eoutils, fn_obj = impl:function_get()
@@ -568,6 +576,7 @@ build_method = function(impl, cl)
     local methn = cl:name_get() .. "." .. fn:name_get()
     local f = writer.Writer(mns, methn)
     printgen("Generating method: " .. methn)
+    write_back(f, cl)
 
     local doc = eoutils.parent_doc_get(impl, cl, eolian.function_type.METHOD)
 
@@ -607,6 +616,7 @@ build_property = function(impl, cl)
     local propn = cl:name_get() .. "." .. fn:name_get()
     local f = writer.Writer(pns, propn)
     printgen("Generating property: " .. propn)
+    write_back(f, cl)
 
     local pimp = fn:implement_get()
 

-- 


Reply via email to