nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
model: add MEntity::mdoc_or_fallback to get more documentation
[nit.git]
/
src
/
model
/
mproject.nit
diff --git
a/src/model/mproject.nit
b/src/model/mproject.nit
index
c23e5cb
..
b89eced
100644
(file)
--- a/
src/model/mproject.nit
+++ b/
src/model/mproject.nit
@@
-18,6
+18,7
@@
module mproject
import model_base
private import more_collections
import poset
import model_base
private import more_collections
import poset
+import mdoc
# A Nit project, that encompass a product
class MProject
# A Nit project, that encompass a product
class MProject
@@
-45,6
+46,12
@@
class MProject
# MProject are always roots of the concerns hierarchy
redef fun parent_concern do return null
# MProject are always roots of the concerns hierarchy
redef fun parent_concern do return null
+
+ redef fun mdoc_or_fallback
+ do
+ if mdoc != null then return mdoc
+ return root.mdoc_or_fallback
+ end
end
# A group of modules in a project
end
# A group of modules in a project