nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge: serialization: serialize the Error class and avoid abstract classes with...
[nit.git]
/
src
/
nitcatalog.nit
diff --git
a/src/nitcatalog.nit
b/src/nitcatalog.nit
index
b692a91
..
33d1871
100644
(file)
--- a/
src/nitcatalog.nit
+++ b/
src/nitcatalog.nit
@@
-245,7
+245,7
@@
class Catalog
end
# Recursively generate a level in the file tree of the *content* section
end
# Recursively generate a level in the file tree of the *content* section
- private fun gen_content_level(ot: OrderedTree[Object], os: Array[Object], res: Template)
+ private fun gen_content_level(ot: OrderedTree[MConcern], os: Array[Object], res: Template)
do
res.add "<ul>\n"
for o in os do
do
res.add "<ul>\n"
for o in os do
@@
-255,13
+255,10
@@
class Catalog
var mdoc = o.mdoc
if mdoc != null then d = ": {mdoc.html_synopsis.write_to_string}"
res.add "<strong>{o.name}</strong>{d} ({o.filepath.to_s})"
var mdoc = o.mdoc
if mdoc != null then d = ": {mdoc.html_synopsis.write_to_string}"
res.add "<strong>{o.name}</strong>{d} ({o.filepath.to_s})"
- else if o isa ModulePath then
+ else if o isa MModule then
var d = ""
var d = ""
- var m = o.mmodule
- if m != null then
- var mdoc = m.mdoc
- if mdoc != null then d = ": {mdoc.html_synopsis.write_to_string}"
- end
+ var mdoc = o.mdoc
+ if mdoc != null then d = ": {mdoc.html_synopsis.write_to_string}"
res.add "<strong>{o.name}</strong>{d} ({o.filepath.to_s})"
else
abort
res.add "<strong>{o.name}</strong>{d} ({o.filepath.to_s})"
else
abort
@@
-293,14
+290,14
@@
class Catalog
end
res.add "<h2>Content</h2>"
end
res.add "<h2>Content</h2>"
- var ot = new OrderedTree[Object]
+ var ot = new OrderedTree[MConcern]
for g in mpackage.mgroups do
var pa = g.parent
if g.is_interesting then
ot.add(pa, g)
pa = g
end
for g in mpackage.mgroups do
var pa = g.parent
if g.is_interesting then
ot.add(pa, g)
pa = g
end
- for mp in g.module_paths do
+ for mp in g.mmodules do
ot.add(pa, mp)
end
end
ot.add(pa, mp)
end
end
@@
-319,6
+316,12
@@
class Catalog
var e = tryit.html_escape
res.add "<li><a href=\"{e}\">Try<span style=\"color:white\">n</span>it!</a></li>\n"
end
var e = tryit.html_escape
res.add "<li><a href=\"{e}\">Try<span style=\"color:white\">n</span>it!</a></li>\n"
end
+ var apk = mpackage.metadata("upstream.apk")
+ if apk != null then
+ score += 1.0
+ var e = apk.html_escape
+ res.add "<li><a href=\"{e}\">Android apk</a></li>\n"
+ end
res.add """</ul>\n<ul class="box">\n"""
res.add """</ul>\n<ul class="box">\n"""
@@
-384,6
+387,7
@@
class Catalog
end
if ts.is_empty then ts.add "none"
if tryit != null then ts.add "tryit"
end
if ts.is_empty then ts.add "none"
if tryit != null then ts.add "tryit"
+ if apk != null then ts.add "apk"
var ts2 = new Array[String]
for t in ts do
tag2proj[t].add mpackage
var ts2 = new Array[String]
for t in ts do
tag2proj[t].add mpackage
@@
-443,6
+447,12
@@
class Catalog
end
var contributors = mpackage.contributors
end
var contributors = mpackage.contributors
+ var more_contributors = mpackage.metadata("package.more_contributors")
+ if more_contributors != null then
+ for c in more_contributors.split(",") do
+ contributors.add c.trim
+ end
+ end
if not contributors.is_empty then
res.add "<h3>Contributors</h3>\n<ul class=\"box\">"
for c in contributors do
if not contributors.is_empty then
res.add "<h3>Contributors</h3>\n<ul class=\"box\">"
for c in contributors do
@@
-457,7
+467,7
@@
class Catalog
var mmethods = 0
var loc = 0
for g in mpackage.mgroups do
var mmethods = 0
var loc = 0
for g in mpackage.mgroups do
- mmodules += g.module_paths.length
+ mmodules += g.mmodules.length
for m in g.mmodules do
var am = modelbuilder.mmodule2node(m)
if am != null then
for m in g.mmodules do
var am = modelbuilder.mmodule2node(m)
if am != null then
@@
-678,9
+688,11
@@
var modelbuilder = new ModelBuilder(model, tc)
var catalog = new Catalog(modelbuilder)
# Get files or groups
var catalog = new Catalog(modelbuilder)
# Get files or groups
-for a in tc.option_context.rest do
- modelbuilder.get_mgroup(a)
- modelbuilder.identify_file(a)
+var args = tc.option_context.rest
+if opt_no_parse.value then
+ modelbuilder.scan_full(args)
+else
+ modelbuilder.parse_full(args)
end
# Scan packages and compute information
end
# Scan packages and compute information
@@
-691,7
+703,6
@@
for p in model.mpackages do
# Load the module to process importation information
if opt_no_parse.value then continue
# Load the module to process importation information
if opt_no_parse.value then continue
- modelbuilder.parse_group(g)
catalog.deps.add_node(p)
for gg in p.mgroups do for m in gg.mmodules do
catalog.deps.add_node(p)
for gg in p.mgroups do for m in gg.mmodules do