+ var target_modules = null
+ var importations = null
+ var mgroup = mmodule.mgroup
+ if toolcontext.opt_depth.value == 1 and mgroup != null then
+ modelbuilder.visit_group mgroup
+ target_modules = mgroup.mmodules
+ else if toolcontext.opt_depth.value == 2 then
+ # project
+ target_modules = new Array[MModule]
+ importations = new Array[MModule]
+ if mgroup != null then
+ for g in mgroup.mproject.mgroups do
+ target_modules.add_all g.mmodules
+ end
+
+ for g in mgroup.in_nesting.direct_smallers do
+ var dm = g.default_mmodule
+ if dm != null then
+ importations.add dm
+ end
+ end
+
+ for m in mgroup.mmodules do
+ importations.add m
+ end
+ end
+ end
+
+ if target_modules == null then target_modules = [mmodule]
+ if importations == null then importations = target_modules
+