コード例 #1
0
ファイル: Mapping_main.java プロジェクト: norro/MPS
 @Override
 public boolean apply(
     final TemplateExecutionEnvironment environment,
     final TemplateContext context,
     final SNode outputContextNode)
     throws GenerationException {
   final List<SNode> tlist1 = new ArrayList<SNode>();
   Iterable<SNode> weaveEachList1 =
       QueriesGenerated.sourceNodesQuery_6186432342008522532(
           new SourceSubstituteMacroNodesContext(
               context,
               new SNodePointer(
                   "r:592e27b6-d258-4bf2-9e32-25019862e1f1(jetbrains.mps.traceInfo.testWeavingGenerated.data.generator.template.main@generator)",
                   "6186432342008522531")));
   for (SNode itnode : weaveEachList1) {
     if (itnode == null) {
       continue;
     }
     TemplateContext innerContext = context.subContext(itnode);
     NodeWeaveFacility.WeaveContext weaveContext =
         new WeaveContextImpl(outputContextNode, innerContext, WeavingRule1.this);
     Collection<SNode> innerResult =
         environment
             .prepareWeave(
                 weaveContext,
                 new SNodePointer(
                     "r:592e27b6-d258-4bf2-9e32-25019862e1f1(jetbrains.mps.traceInfo.testWeavingGenerated.data.generator.template.main@generator)",
                     "6186432342008522531"))
             .weaveTemplate(new Template_weave_ChildConceptWeave());
     if (innerResult != null) {
       tlist1.addAll(innerResult);
     }
   }
   return tlist1 != null && !(tlist1.isEmpty());
 }