summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2016-08-02 15:46:03 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2016-08-02 15:46:03 +0100
commitad358a80e961f56db5edc81b268448aad1a933fc (patch)
tree59fa8922f34a5ff78fca4877fc056f3e6d589c35 /src
parent3c34a53cb8b46d72da1f68c1f944f474e2662f75 (diff)
docs: support for foldable inheritance graphs
Diffstat (limited to 'src')
-rw-r--r--src/scripts/elua/apps/gendoc.lua12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/scripts/elua/apps/gendoc.lua b/src/scripts/elua/apps/gendoc.lua
index 828a732700..ec471ab8d6 100644
--- a/src/scripts/elua/apps/gendoc.lua
+++ b/src/scripts/elua/apps/gendoc.lua
@@ -10,7 +10,7 @@ local writer = require("docgen.writer")
10local keyref = require("docgen.keyref") 10local keyref = require("docgen.keyref")
11local ser = require("docgen.serializers") 11local ser = require("docgen.serializers")
12 12
13local use_dot 13local use_dot, use_folded
14 14
15-- eolian to various doc elements conversions 15-- eolian to various doc elements conversions
16 16
@@ -724,7 +724,13 @@ local build_class = function(cl)
724 f:write_list(build_inherits(cl)) 724 f:write_list(build_inherits(cl))
725 f:write_nl() 725 f:write_nl()
726 if use_dot then 726 if use_dot then
727 if use_folded then
728 f:write_raw("++++ Inheritance graph |\n\n")
729 end
727 f:write_graph(build_igraph(cl)) 730 f:write_graph(build_igraph(cl))
731 if use_folded then
732 f:write_raw("\n\n++++")
733 end
728 f:write_nl(2) 734 f:write_nl(2)
729 end 735 end
730 736
@@ -1084,7 +1090,8 @@ getopt.parse {
1084 { "n", "namespace", true, help = "Root namespace of the docs." }, 1090 { "n", "namespace", true, help = "Root namespace of the docs." },
1085 { nil, "graph-theme", true, help = "Optional graph theme." }, 1091 { nil, "graph-theme", true, help = "Optional graph theme." },
1086 { nil, "disable-graphviz", false, help = "Disable graphviz usage." }, 1092 { nil, "disable-graphviz", false, help = "Disable graphviz usage." },
1087 { nil, "disable-notes", false, help = "Disable notes plugin usage." } 1093 { nil, "disable-notes", false, help = "Disable notes plugin usage." },
1094 { nil, "disable-folded", false, help = "Disable folded plugin usage." }
1088 }, 1095 },
1089 error_cb = function(parser, msg) 1096 error_cb = function(parser, msg)
1090 io.stderr:write(msg, "\n") 1097 io.stderr:write(msg, "\n")
@@ -1098,6 +1105,7 @@ getopt.parse {
1098 set_theme(opts["graph-theme"]) 1105 set_theme(opts["graph-theme"])
1099 end 1106 end
1100 use_dot = not opts["disable-graphviz"] 1107 use_dot = not opts["disable-graphviz"]
1108 use_folded = not opts["disable-folded"]
1101 local rootns = (not opts["n"] or opts["n"] == "") 1109 local rootns = (not opts["n"] or opts["n"] == "")
1102 and "efl" or opts["n"] 1110 and "efl" or opts["n"]
1103 local dr 1111 local dr