Beispiel #1
0
 @Override
 public Collection<SNode> apply(@NotNull final TemplateContext context)
     throws GenerationException {
   final TemplateExecutionEnvironment environment = context.getEnvironment();
   Collection<SNode> tlist1 = Collections.emptyList();
   return tlist1;
 }
Beispiel #2
0
 @Override
 public Collection<SNode> apply(@NotNull final TemplateContext context)
     throws GenerationException {
   final TemplateExecutionEnvironment environment = context.getEnvironment();
   Collection<SNode> result = new Template_map_RootConcept().apply(environment, context);
   environment.registerLabel(context.getInput(), result, "map_RootConcept");
   return result;
 }
Beispiel #3
0
 @Override
 public Collection<SNode> apply(@NotNull final TemplateContext context)
     throws GenerationException {
   final TemplateExecutionEnvironment environment = context.getEnvironment();
   Collection<SNode> result =
       new Template_OutputRoot_by_MappingRule().apply(environment, context);
   return result;
 }
Beispiel #4
0
 protected SNode applyPart0(@NotNull final TemplateContext context) throws GenerationException {
   final TemplateExecutionEnvironment environment = context.getEnvironment();
   final SNode tnode1 =
       environment.createOutputNode(
           MetaAdapterFactory.getConcept(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0xfc37588bc8L,
               "jetbrains.mps.baseLanguage.structure.EnumConstantReference"));
   try {
     environment.nodeCopied(
         context, tnode1, "tpl/r:3ab3501c-2f4b-48e6-9b6c-e31ff8ef3185/3308300503039683834");
     tnode1.setReference(
         MetaAdapterFactory.getReferenceLink(
             0xf3061a5392264cc5L,
             0xa443f952ceaf5816L,
             0xfc37588bc8L,
             0xfc37588bcaL,
             "enumConstantDeclaration"),
         SReference.create(
             MetaAdapterFactory.getReferenceLink(
                 0xf3061a5392264cc5L,
                 0xa443f952ceaf5816L,
                 0xfc37588bc8L,
                 0xfc37588bcaL,
                 "enumConstantDeclaration"),
             tnode1,
             PersistenceFacade.getInstance()
                 .createModelReference("r:f5e9b11f-5073-4786-8ed1-a9e42307c3f8(JavaKaja.runtime)"),
             PersistenceFacade.getInstance().createNodeId("3308300503039569144")));
     tnode1.setReference(
         MetaAdapterFactory.getReferenceLink(
             0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xfc37588bc8L, 0x10a758428feL, "enumClass"),
         SReference.create(
             MetaAdapterFactory.getReferenceLink(
                 0xf3061a5392264cc5L,
                 0xa443f952ceaf5816L,
                 0xfc37588bc8L,
                 0x10a758428feL,
                 "enumClass"),
             tnode1,
             PersistenceFacade.getInstance()
                 .createModelReference("r:f5e9b11f-5073-4786-8ed1-a9e42307c3f8(JavaKaja.runtime)"),
             PersistenceFacade.getInstance().createNodeId("3308300503039569134")));
   } finally {
   }
   return tnode1;
 }
Beispiel #5
0
 @Override
 public Collection<SNode> apply(@NotNull final TemplateContext context)
     throws GenerationException {
   final TemplateExecutionEnvironment environment = context.getEnvironment();
   Collection<SNode> tlist1 = null;
   if (QueriesGenerated.baseMappingRule_Condition_1195172400866(
       new BaseMappingRuleContext(context, rule_ief6mt_b0a0c0c11))) {
     final SNode tnode2 =
         environment.createOutputNode(
             MetaAdapterFactory.getConcept(
                 0x157a9668bf58417bL,
                 0x893e53d86388dc56L,
                 0x1164564a526L,
                 "jetbrains.mps.transformation.test.outputLang.structure.OutputNode"));
     try {
       SNodeAccessUtil.setProperty(
           tnode2,
           MetaAdapterFactory.getProperty(
               0x157a9668bf58417bL, 0x893e53d86388dc56L, 0x1164564a526L, 0x11645b5a797L, "text"),
           "<input option : 1>");
     } finally {
     }
     tlist1 = TemplateUtil.singletonList(tnode2);
   } else {
     final SNode tnode3 =
         environment.createOutputNode(
             MetaAdapterFactory.getConcept(
                 0x157a9668bf58417bL,
                 0x893e53d86388dc56L,
                 0x1164564a526L,
                 "jetbrains.mps.transformation.test.outputLang.structure.OutputNode"));
     try {
       SNodeAccessUtil.setProperty(
           tnode3,
           MetaAdapterFactory.getProperty(
               0x157a9668bf58417bL, 0x893e53d86388dc56L, 0x1164564a526L, 0x11645b5a797L, "text"),
           "<input option : default>");
     } finally {
     }
     tlist1 = TemplateUtil.singletonList(tnode3);
   }
   return tlist1;
 }
 @Override
 public Collection<SNode> applyRule(TemplateReductionRule rule, TemplateContext context)
     throws GenerationException {
   try {
     final DependenciesReadListener l;
     if (context.getEnvironment().getGenerator().isIncremental()) {
       // this code used to be in TemplateReductionRuleInterpreted, added to address MPS-16916
       // Moved here for next reasons: (a) generated rules shall behave the same as interpreted;
       // (b) this class is the only place we install listeners via NodeReadEventsCaster, and there
       // shall be no way to get into TRRI with a
       // listener installed (for TRRI to uninstall one) other than through this method.
       // However, I don't understand why there's difference in change tracking in incremental vs
       // non-incremental mode,
       // and why only reduction rules are considered.
       l = null; // turn tracing off
     } else {
       l = listener;
     }
     NodeReadEventsCaster.setNodesReadListener(l);
     return wrapped.applyRule(rule, context);
   } finally {
     NodeReadEventsCaster.removeNodesReadListener();
   }
 }
 protected SNode applyPart0(@NotNull final TemplateContext context) throws GenerationException {
   final TemplateExecutionEnvironment environment = context.getEnvironment();
   final SNode tnode1 =
       environment.createOutputNode(
           MetaAdapterFactory.getConcept(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0xfc092b6b77L,
               "jetbrains.mps.baseLanguage.structure.BlockStatement"));
   try {
     environment.nodeCopied(
         context, tnode1, "tpl/r:262b93f0-fe86-497c-93c5-efd684d05bc6/3210697320273608203");
     {
       final SNode tnode2 =
           environment.createOutputNode(
               MetaAdapterFactory.getConcept(
                   0xf3061a5392264cc5L,
                   0xa443f952ceaf5816L,
                   0xf8cc56b200L,
                   "jetbrains.mps.baseLanguage.structure.StatementList"));
       try {
         environment.nodeCopied(
             context, tnode2, "tpl/r:262b93f0-fe86-497c-93c5-efd684d05bc6/3210697320273608204");
         {
           final SNode tnode3 =
               environment.createOutputNode(
                   MetaAdapterFactory.getConcept(
                       0xf3061a5392264cc5L,
                       0xa443f952ceaf5816L,
                       0xf8cc56b217L,
                       "jetbrains.mps.baseLanguage.structure.IfStatement"));
           try {
             environment.nodeCopied(
                 context,
                 tnode3,
                 "tpl/r:262b93f0-fe86-497c-93c5-efd684d05bc6/3210697320273648370");
             {
               final SNode tnode4 =
                   environment.createOutputNode(
                       MetaAdapterFactory.getConcept(
                           0xf3061a5392264cc5L,
                           0xa443f952ceaf5816L,
                           0xf8cc56b200L,
                           "jetbrains.mps.baseLanguage.structure.StatementList"));
               try {
                 environment.nodeCopied(
                     context,
                     tnode4,
                     "tpl/r:262b93f0-fe86-497c-93c5-efd684d05bc6/3210697320273648371");
                 {
                   final SNode tnode5 =
                       environment.createOutputNode(
                           MetaAdapterFactory.getConcept(
                               0xf3061a5392264cc5L,
                               0xa443f952ceaf5816L,
                               0xf8cc56b213L,
                               "jetbrains.mps.baseLanguage.structure.ExpressionStatement"));
                   try {
                     environment.nodeCopied(
                         context,
                         tnode5,
                         "tpl/r:262b93f0-fe86-497c-93c5-efd684d05bc6/3210697320273608230");
                     {
                       final SNode tnode6 =
                           environment.createOutputNode(
                               MetaAdapterFactory.getConcept(
                                   0xf3061a5392264cc5L,
                                   0xa443f952ceaf5816L,
                                   0x6c6b6a1e379f9404L,
                                   "jetbrains.mps.baseLanguage.structure.LocalMethodCall"));
                       try {
                         environment.nodeCopied(
                             context,
                             tnode6,
                             "tpl/r:262b93f0-fe86-497c-93c5-efd684d05bc6/4923130412073220681");
                         tnode6.setReference(
                             MetaAdapterFactory.getReferenceLink(
                                 0xf3061a5392264cc5L,
                                 0xa443f952ceaf5816L,
                                 0x11857355952L,
                                 0xf8c78301adL,
                                 "baseMethodDeclaration"),
                             SReference.create(
                                 MetaAdapterFactory.getReferenceLink(
                                     0xf3061a5392264cc5L,
                                     0xa443f952ceaf5816L,
                                     0x11857355952L,
                                     0xf8c78301adL,
                                     "baseMethodDeclaration"),
                                 tnode6,
                                 PersistenceFacade.getInstance()
                                     .createModelReference(
                                         "r:f5e9b11f-5073-4786-8ed1-a9e42307c3f8(JavaKaja.runtime)"),
                                 PersistenceFacade.getInstance()
                                     .createNodeId("3210697320273550783")));
                         {
                           final SNode tnode7 =
                               environment.createOutputNode(
                                   MetaAdapterFactory.getConcept(
                                       0xf3061a5392264cc5L,
                                       0xa443f952ceaf5816L,
                                       0xf8cc59b314L,
                                       "jetbrains.mps.baseLanguage.structure.IntegerConstant"));
                           try {
                             environment.nodeCopied(
                                 context,
                                 tnode7,
                                 "tpl/r:262b93f0-fe86-497c-93c5-efd684d05bc6/3210697320273608232");
                             SNodeAccessUtil.setProperty(
                                 tnode7,
                                 MetaAdapterFactory.getProperty(
                                     0xf3061a5392264cc5L,
                                     0xa443f952ceaf5816L,
                                     0xf8cc59b314L,
                                     0xf8cc59b315L,
                                     "value"),
                                 TemplateUtil.asString(
                                     QueriesGenerated
                                         .propertyMacro_GetPropertyValue_3210697320273608239(
                                             new PropertyMacroContext(
                                                 context,
                                                 "0",
                                                 propertyMacro_bs9h6a_c0a0c0b0b0c0b0b0b0b0b0b0b0b0b0b0c0c))));
                           } finally {
                           }
                           if (tnode7 != null) {
                             tnode6.addChild(
                                 MetaAdapterFactory.getContainmentLink(
                                     0xf3061a5392264cc5L,
                                     0xa443f952ceaf5816L,
                                     0x11857355952L,
                                     0xf8c78301aeL,
                                     "actualArgument"),
                                 tnode7);
                           }
                           // TODO validate child
                         }
                         {
                           final SNode tnode8 =
                               environment.createOutputNode(
                                   MetaAdapterFactory.getConcept(
                                       0xf3061a5392264cc5L,
                                       0xa443f952ceaf5816L,
                                       0xf8cc59b314L,
                                       "jetbrains.mps.baseLanguage.structure.IntegerConstant"));
                           try {
                             environment.nodeCopied(
                                 context,
                                 tnode8,
                                 "tpl/r:262b93f0-fe86-497c-93c5-efd684d05bc6/3210697320273608234");
                             SNodeAccessUtil.setProperty(
                                 tnode8,
                                 MetaAdapterFactory.getProperty(
                                     0xf3061a5392264cc5L,
                                     0xa443f952ceaf5816L,
                                     0xf8cc59b314L,
                                     0xf8cc59b315L,
                                     "value"),
                                 TemplateUtil.asString(
                                     QueriesGenerated
                                         .propertyMacro_GetPropertyValue_3210697320273608248(
                                             new PropertyMacroContext(
                                                 context,
                                                 "0",
                                                 propertyMacro_bs9h6a_c0a0c0b0b0d0b0b0b0b0b0b0b0b0b0b0c0c))));
                           } finally {
                           }
                           if (tnode8 != null) {
                             tnode6.addChild(
                                 MetaAdapterFactory.getContainmentLink(
                                     0xf3061a5392264cc5L,
                                     0xa443f952ceaf5816L,
                                     0x11857355952L,
                                     0xf8c78301aeL,
                                     "actualArgument"),
                                 tnode8);
                           }
                           // TODO validate child
                         }
                       } finally {
                       }
                       if (tnode6 != null) {
                         tnode5.addChild(
                             MetaAdapterFactory.getContainmentLink(
                                 0xf3061a5392264cc5L,
                                 0xa443f952ceaf5816L,
                                 0xf8cc56b213L,
                                 0xf8cc56b214L,
                                 "expression"),
                             tnode6);
                       }
                       // TODO validate child
                     }
                   } finally {
                   }
                   if (tnode5 != null) {
                     tnode4.addChild(
                         MetaAdapterFactory.getContainmentLink(
                             0xf3061a5392264cc5L,
                             0xa443f952ceaf5816L,
                             0xf8cc56b200L,
                             0xf8cc6bf961L,
                             "statement"),
                         tnode5);
                   }
                   // TODO validate child
                 }
                 {
                   final SNode tnode9 =
                       environment.createOutputNode(
                           MetaAdapterFactory.getConcept(
                               0xf3061a5392264cc5L,
                               0xa443f952ceaf5816L,
                               0xf8cc56b213L,
                               "jetbrains.mps.baseLanguage.structure.ExpressionStatement"));
                   try {
                     environment.nodeCopied(
                         context,
                         tnode9,
                         "tpl/r:262b93f0-fe86-497c-93c5-efd684d05bc6/3210697320273648390");
                     {
                       final SNode tnode10 =
                           environment.createOutputNode(
                               MetaAdapterFactory.getConcept(
                                   0xf3061a5392264cc5L,
                                   0xa443f952ceaf5816L,
                                   0x6c6b6a1e379f9404L,
                                   "jetbrains.mps.baseLanguage.structure.LocalMethodCall"));
                       try {
                         environment.nodeCopied(
                             context,
                             tnode10,
                             "tpl/r:262b93f0-fe86-497c-93c5-efd684d05bc6/4923130412073300953");
                         tnode10.setReference(
                             MetaAdapterFactory.getReferenceLink(
                                 0xf3061a5392264cc5L,
                                 0xa443f952ceaf5816L,
                                 0x11857355952L,
                                 0xf8c78301adL,
                                 "baseMethodDeclaration"),
                             SReference.create(
                                 MetaAdapterFactory.getReferenceLink(
                                     0xf3061a5392264cc5L,
                                     0xa443f952ceaf5816L,
                                     0x11857355952L,
                                     0xf8c78301adL,
                                     "baseMethodDeclaration"),
                                 tnode10,
                                 PersistenceFacade.getInstance()
                                     .createModelReference(
                                         "r:f5e9b11f-5073-4786-8ed1-a9e42307c3f8(JavaKaja.runtime)"),
                                 PersistenceFacade.getInstance()
                                     .createNodeId("3210697320273550615")));
                       } finally {
                       }
                       if (tnode10 != null) {
                         tnode9.addChild(
                             MetaAdapterFactory.getContainmentLink(
                                 0xf3061a5392264cc5L,
                                 0xa443f952ceaf5816L,
                                 0xf8cc56b213L,
                                 0xf8cc56b214L,
                                 "expression"),
                             tnode10);
                       }
                       // TODO validate child
                     }
                   } finally {
                   }
                   if (tnode9 != null) {
                     tnode4.addChild(
                         MetaAdapterFactory.getContainmentLink(
                             0xf3061a5392264cc5L,
                             0xa443f952ceaf5816L,
                             0xf8cc56b200L,
                             0xf8cc6bf961L,
                             "statement"),
                         tnode9);
                   }
                   // TODO validate child
                 }
               } finally {
               }
               if (tnode4 != null) {
                 tnode3.addChild(
                     MetaAdapterFactory.getContainmentLink(
                         0xf3061a5392264cc5L,
                         0xa443f952ceaf5816L,
                         0xf8cc56b217L,
                         0xf8cc56b219L,
                         "ifTrue"),
                     tnode4);
               }
               // TODO validate child
             }
             {
               final SNode tnode11 =
                   environment.createOutputNode(
                       MetaAdapterFactory.getConcept(
                           0xf3061a5392264cc5L,
                           0xa443f952ceaf5816L,
                           0xfb7c3070eeL,
                           "jetbrains.mps.baseLanguage.structure.AndExpression"));
               try {
                 environment.nodeCopied(
                     context,
                     tnode11,
                     "tpl/r:262b93f0-fe86-497c-93c5-efd684d05bc6/3210697320273648393");
                 {
                   final SNode tnode12 =
                       environment.createOutputNode(
                           MetaAdapterFactory.getConcept(
                               0xf3061a5392264cc5L,
                               0xa443f952ceaf5816L,
                               0x6c6b6a1e379f9404L,
                               "jetbrains.mps.baseLanguage.structure.LocalMethodCall"));
                   try {
                     environment.nodeCopied(
                         context,
                         tnode12,
                         "tpl/r:262b93f0-fe86-497c-93c5-efd684d05bc6/4923130412073282762");
                     tnode12.setReference(
                         MetaAdapterFactory.getReferenceLink(
                             0xf3061a5392264cc5L,
                             0xa443f952ceaf5816L,
                             0x11857355952L,
                             0xf8c78301adL,
                             "baseMethodDeclaration"),
                         SReference.create(
                             MetaAdapterFactory.getReferenceLink(
                                 0xf3061a5392264cc5L,
                                 0xa443f952ceaf5816L,
                                 0x11857355952L,
                                 0xf8c78301adL,
                                 "baseMethodDeclaration"),
                             tnode12,
                             PersistenceFacade.getInstance()
                                 .createModelReference(
                                     "r:f5e9b11f-5073-4786-8ed1-a9e42307c3f8(JavaKaja.runtime)"),
                             PersistenceFacade.getInstance().createNodeId("3210697320273648281")));
                     {
                       final SNode tnode13 =
                           environment.createOutputNode(
                               MetaAdapterFactory.getConcept(
                                   0xf3061a5392264cc5L,
                                   0xa443f952ceaf5816L,
                                   0xf8cc59b314L,
                                   "jetbrains.mps.baseLanguage.structure.IntegerConstant"));
                       try {
                         environment.nodeCopied(
                             context,
                             tnode13,
                             "tpl/r:262b93f0-fe86-497c-93c5-efd684d05bc6/3210697320273648395");
                         SNodeAccessUtil.setProperty(
                             tnode13,
                             MetaAdapterFactory.getProperty(
                                 0xf3061a5392264cc5L,
                                 0xa443f952ceaf5816L,
                                 0xf8cc59b314L,
                                 0xf8cc59b315L,
                                 "value"),
                             TemplateUtil.asString(
                                 QueriesGenerated
                                     .propertyMacro_GetPropertyValue_3210697320273648397(
                                         new PropertyMacroContext(
                                             context,
                                             "0",
                                             propertyMacro_bs9h6a_c0a0c0b0b0c0b0b0b0c0b0b0b0b0c0c))));
                       } finally {
                       }
                       if (tnode13 != null) {
                         tnode12.addChild(
                             MetaAdapterFactory.getContainmentLink(
                                 0xf3061a5392264cc5L,
                                 0xa443f952ceaf5816L,
                                 0x11857355952L,
                                 0xf8c78301aeL,
                                 "actualArgument"),
                             tnode13);
                       }
                       // TODO validate child
                     }
                   } finally {
                   }
                   if (tnode12 != null) {
                     tnode11.addChild(
                         MetaAdapterFactory.getContainmentLink(
                             0xf3061a5392264cc5L,
                             0xa443f952ceaf5816L,
                             0xfbdeb6fecfL,
                             0xfbdeb7a11bL,
                             "rightExpression"),
                         tnode12);
                   }
                   // TODO validate child
                 }
                 {
                   final SNode tnode14 =
                       environment.createOutputNode(
                           MetaAdapterFactory.getConcept(
                               0xf3061a5392264cc5L,
                               0xa443f952ceaf5816L,
                               0x6c6b6a1e379f9404L,
                               "jetbrains.mps.baseLanguage.structure.LocalMethodCall"));
                   try {
                     environment.nodeCopied(
                         context,
                         tnode14,
                         "tpl/r:262b93f0-fe86-497c-93c5-efd684d05bc6/4923130412073256581");
                     tnode14.setReference(
                         MetaAdapterFactory.getReferenceLink(
                             0xf3061a5392264cc5L,
                             0xa443f952ceaf5816L,
                             0x11857355952L,
                             0xf8c78301adL,
                             "baseMethodDeclaration"),
                         SReference.create(
                             MetaAdapterFactory.getReferenceLink(
                                 0xf3061a5392264cc5L,
                                 0xa443f952ceaf5816L,
                                 0x11857355952L,
                                 0xf8c78301adL,
                                 "baseMethodDeclaration"),
                             tnode14,
                             PersistenceFacade.getInstance()
                                 .createModelReference(
                                     "r:f5e9b11f-5073-4786-8ed1-a9e42307c3f8(JavaKaja.runtime)"),
                             PersistenceFacade.getInstance().createNodeId("3210697320273648203")));
                     {
                       final SNode tnode15 =
                           environment.createOutputNode(
                               MetaAdapterFactory.getConcept(
                                   0xf3061a5392264cc5L,
                                   0xa443f952ceaf5816L,
                                   0xf8cc59b314L,
                                   "jetbrains.mps.baseLanguage.structure.IntegerConstant"));
                       try {
                         environment.nodeCopied(
                             context,
                             tnode15,
                             "tpl/r:262b93f0-fe86-497c-93c5-efd684d05bc6/3210697320273648404");
                         SNodeAccessUtil.setProperty(
                             tnode15,
                             MetaAdapterFactory.getProperty(
                                 0xf3061a5392264cc5L,
                                 0xa443f952ceaf5816L,
                                 0xf8cc59b314L,
                                 0xf8cc59b315L,
                                 "value"),
                             TemplateUtil.asString(
                                 QueriesGenerated
                                     .propertyMacro_GetPropertyValue_3210697320273648406(
                                         new PropertyMacroContext(
                                             context,
                                             "0",
                                             propertyMacro_bs9h6a_c0a0c0b0b0c0b0c0b0c0b0b0b0b0c0c))));
                       } finally {
                       }
                       if (tnode15 != null) {
                         tnode14.addChild(
                             MetaAdapterFactory.getContainmentLink(
                                 0xf3061a5392264cc5L,
                                 0xa443f952ceaf5816L,
                                 0x11857355952L,
                                 0xf8c78301aeL,
                                 "actualArgument"),
                             tnode15);
                       }
                       // TODO validate child
                     }
                   } finally {
                   }
                   if (tnode14 != null) {
                     tnode11.addChild(
                         MetaAdapterFactory.getContainmentLink(
                             0xf3061a5392264cc5L,
                             0xa443f952ceaf5816L,
                             0xfbdeb6fecfL,
                             0xfbdeb7a11cL,
                             "leftExpression"),
                         tnode14);
                   }
                   // TODO validate child
                 }
               } finally {
               }
               if (tnode11 != null) {
                 tnode3.addChild(
                     MetaAdapterFactory.getContainmentLink(
                         0xf3061a5392264cc5L,
                         0xa443f952ceaf5816L,
                         0xf8cc56b217L,
                         0xf8cc56b218L,
                         "condition"),
                     tnode11);
               }
               // TODO validate child
             }
             {
               final SNode tnode16 =
                   environment.createOutputNode(
                       MetaAdapterFactory.getConcept(
                           0xf3061a5392264cc5L,
                           0xa443f952ceaf5816L,
                           0xfc092b6b77L,
                           "jetbrains.mps.baseLanguage.structure.BlockStatement"));
               try {
                 environment.nodeCopied(
                     context,
                     tnode16,
                     "tpl/r:262b93f0-fe86-497c-93c5-efd684d05bc6/3210697320273648412");
                 {
                   final SNode tnode17 =
                       environment.createOutputNode(
                           MetaAdapterFactory.getConcept(
                               0xf3061a5392264cc5L,
                               0xa443f952ceaf5816L,
                               0xf8cc56b200L,
                               "jetbrains.mps.baseLanguage.structure.StatementList"));
                   try {
                     environment.nodeCopied(
                         context,
                         tnode17,
                         "tpl/r:262b93f0-fe86-497c-93c5-efd684d05bc6/3210697320273648413");
                     {
                       final SNode tnode18 =
                           environment.createOutputNode(
                               MetaAdapterFactory.getConcept(
                                   0xf3061a5392264cc5L,
                                   0xa443f952ceaf5816L,
                                   0xf8cc56b213L,
                                   "jetbrains.mps.baseLanguage.structure.ExpressionStatement"));
                       try {
                         environment.nodeCopied(
                             context,
                             tnode18,
                             "tpl/r:262b93f0-fe86-497c-93c5-efd684d05bc6/3210697320273648414");
                         {
                           final SNode tnode19 =
                               environment.createOutputNode(
                                   MetaAdapterFactory.getConcept(
                                       0xf3061a5392264cc5L,
                                       0xa443f952ceaf5816L,
                                       0x6c6b6a1e379f9404L,
                                       "jetbrains.mps.baseLanguage.structure.LocalMethodCall"));
                           try {
                             environment.nodeCopied(
                                 context,
                                 tnode19,
                                 "tpl/r:262b93f0-fe86-497c-93c5-efd684d05bc6/4923130412073283103");
                             tnode19.setReference(
                                 MetaAdapterFactory.getReferenceLink(
                                     0xf3061a5392264cc5L,
                                     0xa443f952ceaf5816L,
                                     0x11857355952L,
                                     0xf8c78301adL,
                                     "baseMethodDeclaration"),
                                 SReference.create(
                                     MetaAdapterFactory.getReferenceLink(
                                         0xf3061a5392264cc5L,
                                         0xa443f952ceaf5816L,
                                         0x11857355952L,
                                         0xf8c78301adL,
                                         "baseMethodDeclaration"),
                                     tnode19,
                                     PersistenceFacade.getInstance()
                                         .createModelReference(
                                             "r:f5e9b11f-5073-4786-8ed1-a9e42307c3f8(JavaKaja.runtime)"),
                                     PersistenceFacade.getInstance()
                                         .createNodeId("3308300503039580739")));
                             {
                               final SNode tnode20 =
                                   environment.createOutputNode(
                                       MetaAdapterFactory.getConcept(
                                           0xf3061a5392264cc5L,
                                           0xa443f952ceaf5816L,
                                           0xf93d565d10L,
                                           "jetbrains.mps.baseLanguage.structure.StringLiteral"));
                               try {
                                 environment.nodeCopied(
                                     context,
                                     tnode20,
                                     "tpl/r:262b93f0-fe86-497c-93c5-efd684d05bc6/3210697320273648416");
                                 SNodeAccessUtil.setProperty(
                                     tnode20,
                                     MetaAdapterFactory.getProperty(
                                         0xf3061a5392264cc5L,
                                         0xa443f952ceaf5816L,
                                         0xf93d565d10L,
                                         0xf93d565d11L,
                                         "value"),
                                     "Attempted to destroy wall outside of the playground!");
                               } finally {
                               }
                               if (tnode20 != null) {
                                 tnode19.addChild(
                                     MetaAdapterFactory.getContainmentLink(
                                         0xf3061a5392264cc5L,
                                         0xa443f952ceaf5816L,
                                         0x11857355952L,
                                         0xf8c78301aeL,
                                         "actualArgument"),
                                     tnode20);
                               }
                               // TODO validate child
                             }
                           } finally {
                           }
                           if (tnode19 != null) {
                             tnode18.addChild(
                                 MetaAdapterFactory.getContainmentLink(
                                     0xf3061a5392264cc5L,
                                     0xa443f952ceaf5816L,
                                     0xf8cc56b213L,
                                     0xf8cc56b214L,
                                     "expression"),
                                 tnode19);
                           }
                           // TODO validate child
                         }
                       } finally {
                       }
                       if (tnode18 != null) {
                         tnode17.addChild(
                             MetaAdapterFactory.getContainmentLink(
                                 0xf3061a5392264cc5L,
                                 0xa443f952ceaf5816L,
                                 0xf8cc56b200L,
                                 0xf8cc6bf961L,
                                 "statement"),
                             tnode18);
                       }
                       // TODO validate child
                     }
                   } finally {
                   }
                   if (tnode17 != null) {
                     tnode16.addChild(
                         MetaAdapterFactory.getContainmentLink(
                             0xf3061a5392264cc5L,
                             0xa443f952ceaf5816L,
                             0xfc092b6b77L,
                             0xfc092b6b78L,
                             "statements"),
                         tnode17);
                   }
                   // TODO validate child
                 }
               } finally {
               }
               if (tnode16 != null) {
                 tnode3.addChild(
                     MetaAdapterFactory.getContainmentLink(
                         0xf3061a5392264cc5L,
                         0xa443f952ceaf5816L,
                         0xf8cc56b217L,
                         0xfc092b6b76L,
                         "ifFalseStatement"),
                     tnode16);
               }
               // TODO validate child
             }
           } finally {
           }
           if (tnode3 != null) {
             tnode2.addChild(
                 MetaAdapterFactory.getContainmentLink(
                     0xf3061a5392264cc5L,
                     0xa443f952ceaf5816L,
                     0xf8cc56b200L,
                     0xf8cc6bf961L,
                     "statement"),
                 tnode3);
           }
           // TODO validate child
         }
       } finally {
       }
       if (tnode2 != null) {
         tnode1.addChild(
             MetaAdapterFactory.getContainmentLink(
                 0xf3061a5392264cc5L,
                 0xa443f952ceaf5816L,
                 0xfc092b6b77L,
                 0xfc092b6b78L,
                 "statements"),
             tnode2);
       }
       // TODO validate child
     }
   } finally {
   }
   return tnode1;
 }
Beispiel #8
0
 protected SNode applyPart0(@NotNull final TemplateContext context) throws GenerationException {
   final TemplateExecutionEnvironment environment = context.getEnvironment();
   final SNode tnode1 =
       environment.createOutputNode(
           MetaAdapterFactory.getConcept(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0xf8cc56b213L,
               "jetbrains.mps.baseLanguage.structure.ExpressionStatement"));
   try {
     environment.nodeCopied(
         context, tnode1, "tpl/r:00000000-0000-4000-0000-011c89590606/4146564171992617074");
     TemplateContext context1 = context.subContext();
     {
       final SNode tnode2 =
           environment.createOutputNode(
               MetaAdapterFactory.getConcept(
                   0xf3061a5392264cc5L,
                   0xa443f952ceaf5816L,
                   0x617aa860be8616ecL,
                   "jetbrains.mps.baseLanguage.structure.MulAssignmentExpression"));
       try {
         environment.nodeCopied(
             context1, tnode2, "tpl/r:00000000-0000-4000-0000-011c89590606/4146564171992617076");
         TemplateContext context2 = context1.subContext();
         {
           Collection<SNode> tlist3 = null;
           final SNode copySrcInput3 =
               QueriesGenerated.sourceNodeQuery_4146564171992617089(
                   new SourceSubstituteMacroNodeContext(
                       context2, copySrcMacro_dv1upb_b0a0c0c0b0c0c0f));
           tlist3 =
               environment.copyNodes(
                   TemplateUtil.singletonList(copySrcInput3),
                   copySrcMacro_dv1upb_b0a0c0c0b0c0c0f,
                   "tpl/r:00000000-0000-4000-0000-011c89590606/4265636116363093718",
                   context2);
           for (SNode child4 : TemplateUtil.asNotNull(tlist3)) {
             tnode2.addChild(
                 MetaAdapterFactory.getContainmentLink(
                     0xf3061a5392264cc5L,
                     0xa443f952ceaf5816L,
                     0x11b0d00332cL,
                     0xf8c77f1e97L,
                     "lValue"),
                 child4);
           }
           // TODO validate child
         }
         {
           Collection<SNode> tlist5 = null;
           final SNode copySrcInput5 =
               QueriesGenerated.sourceNodeQuery_4146564171992617085(
                   new SourceSubstituteMacroNodeContext(
                       context2, copySrcMacro_dv1upb_b0a0c0d0b0c0c0f));
           tlist5 =
               environment.copyNodes(
                   TemplateUtil.singletonList(copySrcInput5),
                   copySrcMacro_dv1upb_b0a0c0d0b0c0c0f,
                   "tpl/r:00000000-0000-4000-0000-011c89590606/4146564171992617079",
                   context2);
           for (SNode child6 : TemplateUtil.asNotNull(tlist5)) {
             tnode2.addChild(
                 MetaAdapterFactory.getContainmentLink(
                     0xf3061a5392264cc5L,
                     0xa443f952ceaf5816L,
                     0x11b0d00332cL,
                     0xf8c77f1e99L,
                     "rValue"),
                 child6);
           }
           // TODO validate child
         }
       } finally {
       }
       if (tnode2 != null) {
         tnode1.addChild(
             MetaAdapterFactory.getContainmentLink(
                 0xf3061a5392264cc5L,
                 0xa443f952ceaf5816L,
                 0xf8cc56b213L,
                 0xf8cc56b214L,
                 "expression"),
             tnode2);
       }
       // TODO validate child
     }
   } finally {
   }
   return tnode1;
 }
 protected TemplateQueryContext(
     @NotNull SNodeReference templateNode, @NotNull TemplateContext context) {
   myContext = context;
   myTemplateNode = templateNode;
   myGenerator = context.getEnvironment().getGenerator();
 }