nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
40c6ea4
)
model_views: build posets from mentities lists
author
Alexandre Terrasa
<alexandre@moz-code.org>
Fri, 18 Dec 2015 05:21:16 +0000
(
00:21
-0500)
committer
Alexandre Terrasa
<alexandre@moz-code.org>
Thu, 21 Apr 2016 21:37:14 +0000
(17:37 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
src/model/model_views.nit
patch
|
blob
|
history
diff --git
a/src/model/model_views.nit
b/src/model/model_views.nit
index
3a88f45
..
f130f09
100644
(file)
--- a/
src/model/model_views.nit
+++ b/
src/model/model_views.nit
@@
-155,6
+155,16
@@
class ModelView
end
return v.tree
end
+
+ # Build the POSet of `mmodules` importation.
+ fun mmodules_poset(mmodules: Set[MModule]): POSet[MModule] do
+ return model.mmodule_importation_hierarchy.sub(mmodules)
+ end
+
+ # Build the POSet of `mmodules` hierarchy.
+ fun mclasses_poset(mainmodule: MModule, mclasses: Set[MClass]): POSet[MClass] do
+ return mainmodule.flatten_mclass_hierarchy.sub(mclasses)
+ end
end
class LookupNamespaceVisitor