Пример #1
0
 protected SNode applyPart0(
     @NotNull final TemplateExecutionEnvironment environment,
     @NotNull final TemplateContext context)
     throws GenerationException {
   final SNode tnode1 =
       environment.createOutputNode("jetbrains.mps.baseLanguage.structure.PlusExpression");
   try {
     environment.nodeCopied(
         context, tnode1, "tpl/r:00000000-0000-4000-0000-011c89590606/5857536350883039171");
     {
       final SNode tnode2 =
           environment.createOutputNode("jetbrains.mps.baseLanguage.structure.IntegerConstant");
       try {
         environment.nodeCopied(
             context, tnode2, "tpl/r:00000000-0000-4000-0000-011c89590606/5857536350883039163");
         SNodeAccessUtil.setProperty(tnode2, "value", "58");
       } finally {
       }
       if (tnode2 != null) {
         tnode1.addChild("leftExpression", tnode2);
       }
       // TODO validate child
     }
     {
       final SNode tnode3 =
           environment.createOutputNode(
               "jetbrains.mps.baseLanguage.structure.ParenthesizedExpression");
       try {
         environment.nodeCopied(
             context, tnode3, "tpl/r:00000000-0000-4000-0000-011c89590606/5857536350883039199");
         {
           final SNode tnode4 =
               environment.createOutputNode("jetbrains.mps.baseLanguage.structure.DotExpression");
           try {
             environment.nodeCopied(
                 context,
                 tnode4,
                 "tpl/r:00000000-0000-4000-0000-011c89590606/5857536350883039202");
             {
               final SNode tnode5 =
                   environment.createOutputNode(
                       "jetbrains.mps.baseLanguage.structure.StringLiteral");
               try {
                 environment.nodeCopied(
                     context,
                     tnode5,
                     "tpl/r:00000000-0000-4000-0000-011c89590606/5857536350883039201");
                 SNodeAccessUtil.setProperty(
                     tnode5,
                     "value",
                     TemplateUtil.asString(
                         QueriesGenerated.propertyMacro_GetPropertyValue_5857536350883039219(
                             new PropertyMacroContext(
                                 context, null, propertyMacro_nofsa1_c0a0c0b0b0b0b0b0b0c0b0e))));
               } finally {
               }
               if (tnode5 != null) {
                 tnode4.addChild("operand", tnode5);
               }
               // TODO validate child
             }
             {
               final SNode tnode6 =
                   environment.createOutputNode(
                       "jetbrains.mps.baseLanguage.structure.InstanceMethodCallOperation");
               try {
                 environment.nodeCopied(
                     context,
                     tnode6,
                     "tpl/r:00000000-0000-4000-0000-011c89590606/5857536350883039206");
                 tnode6.setReference(
                     "baseMethodDeclaration",
                     SReference.create(
                         "baseMethodDeclaration",
                         tnode6,
                         PersistenceFacade.getInstance()
                             .createModelReference(
                                 "f:java_stub#6354ebe7-c22a-4a0f-ac54-50b52ab9b065#java.lang(JDK/java.lang@java_stub)"),
                         PersistenceFacade.getInstance().createNodeId("~String.length():int")));
               } finally {
               }
               if (tnode6 != null) {
                 tnode4.addChild("operation", tnode6);
               }
               // TODO validate child
             }
           } finally {
           }
           if (tnode4 != null) {
             tnode3.addChild("expression", tnode4);
           }
           // TODO validate child
         }
       } finally {
       }
       if (tnode3 != null) {
         tnode1.addChild("rightExpression", tnode3);
       }
       // TODO validate child
     }
   } finally {
   }
   return tnode1;
 }
 protected SNode applyPart0(
     @NotNull final TemplateExecutionEnvironment environment,
     @NotNull final TemplateContext context)
     throws GenerationException {
   final SNode tnode1 =
       environment.createOutputNode(
           MetaAdapterFactory.getConcept(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0xf8cc56b21dL,
               "jetbrains.mps.baseLanguage.structure.InstanceMethodDeclaration"));
   try {
     environment.nodeCopied(
         context, tnode1, "tpl/r:592e27b6-d258-4bf2-9e32-25019862e1f1/6186432342008522549");
     SNodeAccessUtil.setProperty(
         tnode1,
         MetaAdapterFactory.getProperty(
             0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"),
         TemplateUtil.asString(
             QueriesGenerated.propertyMacro_GetPropertyValue_6186432342008522555(
                 new PropertyMacroContext(context, "method", propertyMacro_asyc93_c0a0c0b0b0c))));
     {
       final SNode tnode2 =
           environment.createOutputNode(
               MetaAdapterFactory.getConcept(
                   0xf3061a5392264cc5L,
                   0xa443f952ceaf5816L,
                   0xf8cc6bf96dL,
                   "jetbrains.mps.baseLanguage.structure.VoidType"));
       try {
         environment.nodeCopied(
             context, tnode2, "tpl/r:592e27b6-d258-4bf2-9e32-25019862e1f1/6186432342008522550");
       } finally {
       }
       if (tnode2 != null) {
         tnode1.addChild(
             MetaAdapterFactory.getContainmentLink(
                 0xf3061a5392264cc5L,
                 0xa443f952ceaf5816L,
                 0xf8cc56b1fcL,
                 0xf8cc56b1fdL,
                 "returnType"),
             tnode2);
       }
       // TODO validate child
     }
     {
       final SNode tnode3 =
           environment.createOutputNode(
               MetaAdapterFactory.getConcept(
                   0xf3061a5392264cc5L,
                   0xa443f952ceaf5816L,
                   0x10af9581ff1L,
                   "jetbrains.mps.baseLanguage.structure.PublicVisibility"));
       try {
         environment.nodeCopied(
             context, tnode3, "tpl/r:592e27b6-d258-4bf2-9e32-25019862e1f1/6186432342008522551");
       } finally {
       }
       if (tnode3 != null) {
         tnode1.addChild(
             MetaAdapterFactory.getContainmentLink(
                 0xf3061a5392264cc5L,
                 0xa443f952ceaf5816L,
                 0x112670d273fL,
                 0x112670d886aL,
                 "visibility"),
             tnode3);
       }
       // TODO validate child
     }
     {
       final SNode tnode4 =
           environment.createOutputNode(
               MetaAdapterFactory.getConcept(
                   0xf3061a5392264cc5L,
                   0xa443f952ceaf5816L,
                   0xf8cc56b200L,
                   "jetbrains.mps.baseLanguage.structure.StatementList"));
       try {
         environment.nodeCopied(
             context, tnode4, "tpl/r:592e27b6-d258-4bf2-9e32-25019862e1f1/6186432342008522552");
         {
           final SNode tnode5 =
               environment.createOutputNode(
                   MetaAdapterFactory.getConcept(
                       0xf3061a5392264cc5L,
                       0xa443f952ceaf5816L,
                       0xf8cc56b213L,
                       "jetbrains.mps.baseLanguage.structure.ExpressionStatement"));
           try {
             environment.nodeCopied(
                 context,
                 tnode5,
                 "tpl/r:592e27b6-d258-4bf2-9e32-25019862e1f1/6186432342008526300");
             {
               final SNode tnode6 =
                   environment.createOutputNode(
                       MetaAdapterFactory.getConcept(
                           0xf3061a5392264cc5L,
                           0xa443f952ceaf5816L,
                           0x116b46a08c4L,
                           "jetbrains.mps.baseLanguage.structure.DotExpression"));
               try {
                 environment.nodeCopied(
                     context,
                     tnode6,
                     "tpl/r:592e27b6-d258-4bf2-9e32-25019862e1f1/6186432342008526301");
                 {
                   final SNode tnode7 =
                       environment.createOutputNode(
                           MetaAdapterFactory.getConcept(
                               0xf3061a5392264cc5L,
                               0xa443f952ceaf5816L,
                               0xf940c80846L,
                               "jetbrains.mps.baseLanguage.structure.StaticFieldReference"));
                   try {
                     environment.nodeCopied(
                         context,
                         tnode7,
                         "tpl/r:592e27b6-d258-4bf2-9e32-25019862e1f1/6186432342008526302");
                     tnode7.setReference(
                         MetaAdapterFactory.getReferenceLink(
                             0xf3061a5392264cc5L,
                             0xa443f952ceaf5816L,
                             0xf940c80846L,
                             0x10a75869f9bL,
                             "classifier"),
                         SReference.create(
                             MetaAdapterFactory.getReferenceLink(
                                 0xf3061a5392264cc5L,
                                 0xa443f952ceaf5816L,
                                 0xf940c80846L,
                                 0x10a75869f9bL,
                                 "classifier"),
                             tnode7,
                             PersistenceFacade.getInstance()
                                 .createModelReference(
                                     "6354ebe7-c22a-4a0f-ac54-50b52ab9b065/java:java.lang()"),
                             PersistenceFacade.getInstance().createNodeId("~System")));
                     tnode7.setReference(
                         MetaAdapterFactory.getReferenceLink(
                             0xf3061a5392264cc5L,
                             0xa443f952ceaf5816L,
                             0xf8c77f1e98L,
                             0xf8cc6bf960L,
                             "variableDeclaration"),
                         SReference.create(
                             MetaAdapterFactory.getReferenceLink(
                                 0xf3061a5392264cc5L,
                                 0xa443f952ceaf5816L,
                                 0xf8c77f1e98L,
                                 0xf8cc6bf960L,
                                 "variableDeclaration"),
                             tnode7,
                             PersistenceFacade.getInstance()
                                 .createModelReference(
                                     "6354ebe7-c22a-4a0f-ac54-50b52ab9b065/java:java.lang()"),
                             PersistenceFacade.getInstance().createNodeId("~System.out")));
                   } finally {
                   }
                   if (tnode7 != null) {
                     tnode6.addChild(
                         MetaAdapterFactory.getContainmentLink(
                             0xf3061a5392264cc5L,
                             0xa443f952ceaf5816L,
                             0x116b46a08c4L,
                             0x116b46a4416L,
                             "operand"),
                         tnode7);
                   }
                   // TODO validate child
                 }
                 {
                   final SNode tnode8 =
                       environment.createOutputNode(
                           MetaAdapterFactory.getConcept(
                               0xf3061a5392264cc5L,
                               0xa443f952ceaf5816L,
                               0x118154a6332L,
                               "jetbrains.mps.baseLanguage.structure.InstanceMethodCallOperation"));
                   try {
                     environment.nodeCopied(
                         context,
                         tnode8,
                         "tpl/r:592e27b6-d258-4bf2-9e32-25019862e1f1/6186432342008526303");
                     tnode8.setReference(
                         MetaAdapterFactory.getReferenceLink(
                             0xf3061a5392264cc5L,
                             0xa443f952ceaf5816L,
                             0x11857355952L,
                             0xf8c78301adL,
                             "baseMethodDeclaration"),
                         SReference.create(
                             MetaAdapterFactory.getReferenceLink(
                                 0xf3061a5392264cc5L,
                                 0xa443f952ceaf5816L,
                                 0x11857355952L,
                                 0xf8c78301adL,
                                 "baseMethodDeclaration"),
                             tnode8,
                             PersistenceFacade.getInstance()
                                 .createModelReference(
                                     "6354ebe7-c22a-4a0f-ac54-50b52ab9b065/java:java.io()"),
                             PersistenceFacade.getInstance()
                                 .createNodeId("~PrintStream.println(java.lang.String):void")));
                     {
                       final SNode tnode9 =
                           environment.createOutputNode(
                               MetaAdapterFactory.getConcept(
                                   0xf3061a5392264cc5L,
                                   0xa443f952ceaf5816L,
                                   0xf8cc67c7fbL,
                                   "jetbrains.mps.baseLanguage.structure.PlusExpression"));
                       try {
                         environment.nodeCopied(
                             context,
                             tnode9,
                             "tpl/r:592e27b6-d258-4bf2-9e32-25019862e1f1/6186432342008526310");
                         {
                           final SNode tnode10 =
                               environment.createOutputNode(
                                   MetaAdapterFactory.getConcept(
                                       0xf3061a5392264cc5L,
                                       0xa443f952ceaf5816L,
                                       0xf93d565d10L,
                                       "jetbrains.mps.baseLanguage.structure.StringLiteral"));
                           try {
                             environment.nodeCopied(
                                 context,
                                 tnode10,
                                 "tpl/r:592e27b6-d258-4bf2-9e32-25019862e1f1/6186432342008526314");
                             SNodeAccessUtil.setProperty(
                                 tnode10,
                                 MetaAdapterFactory.getProperty(
                                     0xf3061a5392264cc5L,
                                     0xa443f952ceaf5816L,
                                     0xf93d565d10L,
                                     0xf93d565d11L,
                                     "value"),
                                 TemplateUtil.asString(
                                     QueriesGenerated
                                         .propertyMacro_GetPropertyValue_6186432342008526320(
                                             new PropertyMacroContext(
                                                 context,
                                                 "name",
                                                 propertyMacro_asyc93_c0a0c0b0b0b0b0c0b0c0b0b0b0b0b0e0b0c))));
                           } finally {
                           }
                           if (tnode10 != null) {
                             tnode9.addChild(
                                 MetaAdapterFactory.getContainmentLink(
                                     0xf3061a5392264cc5L,
                                     0xa443f952ceaf5816L,
                                     0xfbdeb6fecfL,
                                     0xfbdeb7a11bL,
                                     "rightExpression"),
                                 tnode10);
                           }
                           // TODO validate child
                         }
                         {
                           final SNode tnode11 =
                               environment.createOutputNode(
                                   MetaAdapterFactory.getConcept(
                                       0xf3061a5392264cc5L,
                                       0xa443f952ceaf5816L,
                                       0xf93d565d10L,
                                       "jetbrains.mps.baseLanguage.structure.StringLiteral"));
                           try {
                             environment.nodeCopied(
                                 context,
                                 tnode11,
                                 "tpl/r:592e27b6-d258-4bf2-9e32-25019862e1f1/6186432342008526304");
                             SNodeAccessUtil.setProperty(
                                 tnode11,
                                 MetaAdapterFactory.getProperty(
                                     0xf3061a5392264cc5L,
                                     0xa443f952ceaf5816L,
                                     0xf93d565d10L,
                                     0xf93d565d11L,
                                     "value"),
                                 "I'm");
                           } finally {
                           }
                           if (tnode11 != null) {
                             tnode9.addChild(
                                 MetaAdapterFactory.getContainmentLink(
                                     0xf3061a5392264cc5L,
                                     0xa443f952ceaf5816L,
                                     0xfbdeb6fecfL,
                                     0xfbdeb7a11cL,
                                     "leftExpression"),
                                 tnode11);
                           }
                           // TODO validate child
                         }
                       } finally {
                       }
                       if (tnode9 != null) {
                         tnode8.addChild(
                             MetaAdapterFactory.getContainmentLink(
                                 0xf3061a5392264cc5L,
                                 0xa443f952ceaf5816L,
                                 0x11857355952L,
                                 0xf8c78301aeL,
                                 "actualArgument"),
                             tnode9);
                       }
                       // TODO validate child
                     }
                   } finally {
                   }
                   if (tnode8 != null) {
                     tnode6.addChild(
                         MetaAdapterFactory.getContainmentLink(
                             0xf3061a5392264cc5L,
                             0xa443f952ceaf5816L,
                             0x116b46a08c4L,
                             0x116b46b36c4L,
                             "operation"),
                         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
         }
       } finally {
       }
       if (tnode4 != null) {
         tnode1.addChild(
             MetaAdapterFactory.getContainmentLink(
                 0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0xf8cc56b1ffL, "body"),
             tnode4);
       }
       // TODO validate child
     }
   } finally {
   }
   return tnode1;
 }
Пример #3
0
  public Collection<SNode> apply(
      @NotNull final TemplateExecutionEnvironment environment,
      @NotNull final TemplateContext context)
      throws GenerationException {
    final SNode tnode1 = new SNode("jetbrains.mps.baseLanguage.structure.ClassConcept");
    try {
      environment.getTracer().pushTemplateNode(templateNode_kyghau_a0a0a1a1);
      environment.nodeCopied(
          context, tnode1, "tpl/r:00000000-0000-4000-0000-011c89590606/4146564171992412775");
      tnode1.setProperty("name", "RootCustom");

      {
        final SNode tnode2 = new SNode("jetbrains.mps.baseLanguage.structure.FieldDeclaration");
        try {
          environment.getTracer().pushTemplateNode(templateNode_kyghau_a0a0a1a4a1a1);
          environment.nodeCopied(
              context, tnode2, "tpl/r:00000000-0000-4000-0000-011c89590606/5015072279636761135");
          tnode2.setProperty("name", "q");

          {
            final SNode tnode3 =
                new SNode("jetbrains.mps.baseLanguage.structure.PrivateVisibility");
            try {
              environment.getTracer().pushTemplateNode(templateNode_kyghau_a0a0a1a4a1a4a1a1);
              environment.nodeCopied(
                  context,
                  tnode3,
                  "tpl/r:00000000-0000-4000-0000-011c89590606/5015072279636761136");

            } finally {
              environment
                  .getTracer()
                  .pushOutputNode(
                      GenerationTracerUtil.getSNodePointer(environment.getOutputModel(), tnode3));
              environment.getTracer().closeTemplateNode(templateNode_kyghau_a0a0a1a4a1a4a1a1);
            }
            if (tnode3 != null) {
              tnode2.addChild("visibility", tnode3);
            }
            // TODO validate child
          }
          {
            final SNode tnode4 = new SNode("jetbrains.mps.baseLanguage.structure.IntegerType");
            try {
              environment.getTracer().pushTemplateNode(templateNode_kyghau_a0a0a1a5a1a4a1a1);
              environment.nodeCopied(
                  context,
                  tnode4,
                  "tpl/r:00000000-0000-4000-0000-011c89590606/5015072279636761138");

            } finally {
              environment
                  .getTracer()
                  .pushOutputNode(
                      GenerationTracerUtil.getSNodePointer(environment.getOutputModel(), tnode4));
              environment.getTracer().closeTemplateNode(templateNode_kyghau_a0a0a1a5a1a4a1a1);
            }
            if (tnode4 != null) {
              tnode2.addChild("type", tnode4);
            }
            // TODO validate child
          }
        } finally {
          environment
              .getTracer()
              .pushOutputNode(
                  GenerationTracerUtil.getSNodePointer(environment.getOutputModel(), tnode2));
          environment.getTracer().closeTemplateNode(templateNode_kyghau_a0a0a1a4a1a1);
        }
        if (tnode2 != null) {
          tnode1.addChild("field", tnode2);
        }
        // TODO validate child
      }
      {
        final SNode tnode5 =
            new SNode("jetbrains.mps.baseLanguage.structure.InstanceMethodDeclaration");
        try {
          environment.getTracer().pushTemplateNode(templateNode_kyghau_a0a0a1a5a1a1);
          environment.nodeCopied(
              context, tnode5, "tpl/r:00000000-0000-4000-0000-011c89590606/4146564171992412782");
          tnode5.setProperty("name", "main");

          {
            final SNode tnode6 = new SNode("jetbrains.mps.baseLanguage.structure.VoidType");
            try {
              environment.getTracer().pushTemplateNode(templateNode_kyghau_a0a0a1a4a1a5a1a1);
              environment.nodeCopied(
                  context,
                  tnode6,
                  "tpl/r:00000000-0000-4000-0000-011c89590606/4146564171992412783");

            } finally {
              environment
                  .getTracer()
                  .pushOutputNode(
                      GenerationTracerUtil.getSNodePointer(environment.getOutputModel(), tnode6));
              environment.getTracer().closeTemplateNode(templateNode_kyghau_a0a0a1a4a1a5a1a1);
            }
            if (tnode6 != null) {
              tnode5.addChild("returnType", tnode6);
            }
            // TODO validate child
          }
          {
            final SNode tnode7 = new SNode("jetbrains.mps.baseLanguage.structure.PublicVisibility");
            try {
              environment.getTracer().pushTemplateNode(templateNode_kyghau_a0a0a1a5a1a5a1a1);
              environment.nodeCopied(
                  context,
                  tnode7,
                  "tpl/r:00000000-0000-4000-0000-011c89590606/4146564171992412784");

            } finally {
              environment
                  .getTracer()
                  .pushOutputNode(
                      GenerationTracerUtil.getSNodePointer(environment.getOutputModel(), tnode7));
              environment.getTracer().closeTemplateNode(templateNode_kyghau_a0a0a1a5a1a5a1a1);
            }
            if (tnode7 != null) {
              tnode5.addChild("visibility", tnode7);
            }
            // TODO validate child
          }
          {
            Collection<SNode> tlist8 = null;
            try {
              environment.getTracer().pushMacro(copySrcMacro_kyghau_a0a0a1a6a1a5a1a1);
              final SNode copySrcInput8 =
                  QueriesGenerated.sourceNodeQuery_4146564171992412788(
                      environment.getOperationContext(),
                      new SourceSubstituteMacroNodeContext(
                          context.getInput(),
                          copySrcMacro_kyghau_a0a0a1a6a1a5a1a1,
                          context,
                          environment.getGenerator()));
              tlist8 =
                  environment.copyNodes(
                      TemplateUtil.singletonList(copySrcInput8),
                      copySrcMacro_kyghau_a0a0a1a6a1a5a1a1,
                      "tpl/r:00000000-0000-4000-0000-011c89590606/4146564171992412785",
                      null,
                      context);
            } finally {
              environment.getTracer().closeMacro(copySrcMacro_kyghau_a0a0a1a6a1a5a1a1);
            }
            for (SNode child9 : TemplateUtil.asNotNull(tlist8)) {
              tnode5.addChild("body", child9);
            }
            // TODO validate child
          }
        } finally {
          environment
              .getTracer()
              .pushOutputNode(
                  GenerationTracerUtil.getSNodePointer(environment.getOutputModel(), tnode5));
          environment.getTracer().closeTemplateNode(templateNode_kyghau_a0a0a1a5a1a1);
        }
        if (tnode5 != null) {
          tnode1.addChild("method", tnode5);
        }
        // TODO validate child
      }
      {
        final SNode tnode10 = new SNode("jetbrains.mps.baseLanguage.structure.PublicVisibility");
        try {
          environment.getTracer().pushTemplateNode(templateNode_kyghau_a0a0a1a6a1a1);
          environment.nodeCopied(
              context, tnode10, "tpl/r:00000000-0000-4000-0000-011c89590606/4146564171992412776");

        } finally {
          environment
              .getTracer()
              .pushOutputNode(
                  GenerationTracerUtil.getSNodePointer(environment.getOutputModel(), tnode10));
          environment.getTracer().closeTemplateNode(templateNode_kyghau_a0a0a1a6a1a1);
        }
        if (tnode10 != null) {
          tnode1.addChild("visibility", tnode10);
        }
        // TODO validate child
      }
      {
        final SNode tnode11 =
            new SNode("jetbrains.mps.baseLanguage.structure.ConstructorDeclaration");
        try {
          environment.getTracer().pushTemplateNode(templateNode_kyghau_a0a0a1a7a1a1);
          environment.nodeCopied(
              context, tnode11, "tpl/r:00000000-0000-4000-0000-011c89590606/4146564171992412777");

          {
            final SNode tnode12 = new SNode("jetbrains.mps.baseLanguage.structure.VoidType");
            try {
              environment.getTracer().pushTemplateNode(templateNode_kyghau_a0a0a1a3a1a7a1a1);
              environment.nodeCopied(
                  context,
                  tnode12,
                  "tpl/r:00000000-0000-4000-0000-011c89590606/4146564171992412778");

            } finally {
              environment
                  .getTracer()
                  .pushOutputNode(
                      GenerationTracerUtil.getSNodePointer(environment.getOutputModel(), tnode12));
              environment.getTracer().closeTemplateNode(templateNode_kyghau_a0a0a1a3a1a7a1a1);
            }
            if (tnode12 != null) {
              tnode11.addChild("returnType", tnode12);
            }
            // TODO validate child
          }
          {
            final SNode tnode13 =
                new SNode("jetbrains.mps.baseLanguage.structure.PublicVisibility");
            try {
              environment.getTracer().pushTemplateNode(templateNode_kyghau_a0a0a1a4a1a7a1a1);
              environment.nodeCopied(
                  context,
                  tnode13,
                  "tpl/r:00000000-0000-4000-0000-011c89590606/4146564171992412779");

            } finally {
              environment
                  .getTracer()
                  .pushOutputNode(
                      GenerationTracerUtil.getSNodePointer(environment.getOutputModel(), tnode13));
              environment.getTracer().closeTemplateNode(templateNode_kyghau_a0a0a1a4a1a7a1a1);
            }
            if (tnode13 != null) {
              tnode11.addChild("visibility", tnode13);
            }
            // TODO validate child
          }
          {
            final SNode tnode14 = new SNode("jetbrains.mps.baseLanguage.structure.StatementList");
            try {
              environment.getTracer().pushTemplateNode(templateNode_kyghau_a0a0a1a5a1a7a1a1);
              environment.nodeCopied(
                  context,
                  tnode14,
                  "tpl/r:00000000-0000-4000-0000-011c89590606/4146564171992412780");

              {
                final SNode tnode15 =
                    new SNode(
                        "jetbrains.mps.baseLanguage.structure.LocalVariableDeclarationStatement");
                try {
                  environment
                      .getTracer()
                      .pushTemplateNode(templateNode_kyghau_a0a0a1a3a1a5a1a7a1a1);
                  environment.nodeCopied(
                      context,
                      tnode15,
                      "tpl/r:00000000-0000-4000-0000-011c89590606/5015072279636761102");

                  {
                    Collection<SNode> tlist16 = null;
                    try {
                      environment
                          .getTracer()
                          .pushMacro(varMacroRef_kyghau_a0a0a1a3a1a3a1a5a1a7a1a1);
                      final Object varValue16 =
                          QueriesGenerated.insertMacro_varValue_5015072279636761109(
                              environment.getOperationContext(),
                              new TemplateVarContext(
                                  context.getInput(),
                                  varMacroRef_kyghau_a0a0a1a3a1a3a1a5a1a7a1a1,
                                  context,
                                  environment.getGenerator()));
                      TemplateContext context16 =
                          context.subContext(
                              Collections.<String, Object>singletonMap("var:var1", varValue16));
                      final SNode tnode17 =
                          new SNode(
                              "jetbrains.mps.baseLanguage.structure.LocalVariableDeclaration");
                      try {
                        environment
                            .getTracer()
                            .pushTemplateNode(templateNode_kyghau_a0a0a4a1a3a1a3a1a5a1a7a1a1);
                        environment.nodeCopied(
                            context16,
                            tnode17,
                            "tpl/r:00000000-0000-4000-0000-011c89590606/5015072279636761103");
                        tnode17.setProperty("name", "i");

                        {
                          final SNode tnode18 =
                              new SNode("jetbrains.mps.baseLanguage.structure.IntegerType");
                          try {
                            environment
                                .getTracer()
                                .pushTemplateNode(
                                    templateNode_kyghau_a0a0a1a4a4a1a3a1a3a1a5a1a7a1a1);
                            environment.nodeCopied(
                                context16,
                                tnode18,
                                "tpl/r:00000000-0000-4000-0000-011c89590606/5015072279636761104");

                          } finally {
                            environment
                                .getTracer()
                                .pushOutputNode(
                                    GenerationTracerUtil.getSNodePointer(
                                        environment.getOutputModel(), tnode18));
                            environment
                                .getTracer()
                                .closeTemplateNode(
                                    templateNode_kyghau_a0a0a1a4a4a1a3a1a3a1a5a1a7a1a1);
                          }
                          if (tnode18 != null) {
                            tnode17.addChild("type", tnode18);
                          }
                          // TODO validate child
                        }
                        {
                          final SNode tnode19 =
                              new SNode("jetbrains.mps.baseLanguage.structure.IntegerConstant");
                          try {
                            environment
                                .getTracer()
                                .pushTemplateNode(
                                    templateNode_kyghau_a0a0a1a5a4a1a3a1a3a1a5a1a7a1a1);
                            environment.nodeCopied(
                                context16,
                                tnode19,
                                "tpl/r:00000000-0000-4000-0000-011c89590606/5015072279636761106");
                            tnode19.setProperty(
                                "value",
                                TemplateUtil.asString(
                                    QueriesGenerated
                                        .propertyMacro_GetPropertyValue_2721957369897795324(
                                            environment.getOperationContext(),
                                            new PropertyMacroContext(
                                                context16.getInput(),
                                                "0",
                                                propertyMacro_kyghau_c0b0b0a2a1a5a4a1a3a1a3a1a5a1a7a1a1,
                                                context16,
                                                environment.getGenerator()))));

                          } finally {
                            environment
                                .getTracer()
                                .pushOutputNode(
                                    GenerationTracerUtil.getSNodePointer(
                                        environment.getOutputModel(), tnode19));
                            environment
                                .getTracer()
                                .closeTemplateNode(
                                    templateNode_kyghau_a0a0a1a5a4a1a3a1a3a1a5a1a7a1a1);
                          }
                          if (tnode19 != null) {
                            tnode17.addChild("initializer", tnode19);
                          }
                          // TODO validate child
                        }
                      } finally {
                        environment
                            .getTracer()
                            .pushOutputNode(
                                GenerationTracerUtil.getSNodePointer(
                                    environment.getOutputModel(), tnode17));
                        environment
                            .getTracer()
                            .closeTemplateNode(templateNode_kyghau_a0a0a4a1a3a1a3a1a5a1a7a1a1);
                      }
                      tlist16 = TemplateUtil.singletonList(tnode17);
                    } finally {
                      environment
                          .getTracer()
                          .closeMacro(varMacroRef_kyghau_a0a0a1a3a1a3a1a5a1a7a1a1);
                    }
                    for (SNode child20 : TemplateUtil.asNotNull(tlist16)) {
                      tnode15.addChild("localVariableDeclaration", child20);
                    }
                    // TODO validate child
                  }
                } finally {
                  environment
                      .getTracer()
                      .pushOutputNode(
                          GenerationTracerUtil.getSNodePointer(
                              environment.getOutputModel(), tnode15));
                  environment
                      .getTracer()
                      .closeTemplateNode(templateNode_kyghau_a0a0a1a3a1a5a1a7a1a1);
                }
                if (tnode15 != null) {
                  tnode14.addChild("statement", tnode15);
                }
                // TODO validate child
              }
              {
                final SNode tnode21 =
                    new SNode("jetbrains.mps.baseLanguage.structure.ExpressionStatement");
                try {
                  environment
                      .getTracer()
                      .pushTemplateNode(templateNode_kyghau_a0a0a1a4a1a5a1a7a1a1);
                  environment.nodeCopied(
                      context,
                      tnode21,
                      "tpl/r:00000000-0000-4000-0000-011c89590606/5015072279636761140");

                  {
                    final SNode tnode22 =
                        new SNode("jetbrains.mps.baseLanguage.structure.AssignmentExpression");
                    try {
                      environment
                          .getTracer()
                          .pushTemplateNode(templateNode_kyghau_a0a0a1a3a1a4a1a5a1a7a1a1);
                      environment.nodeCopied(
                          context,
                          tnode22,
                          "tpl/r:00000000-0000-4000-0000-011c89590606/5015072279636761142");

                      {
                        final SNode tnode23 =
                            new SNode(
                                "jetbrains.mps.baseLanguage.structure.LocalInstanceFieldReference");
                        try {
                          environment
                              .getTracer()
                              .pushTemplateNode(templateNode_kyghau_a0a0a1a3a1a3a1a4a1a5a1a7a1a1);
                          environment.nodeCopied(
                              context,
                              tnode23,
                              "tpl/r:00000000-0000-4000-0000-011c89590606/5015072279636761141");
                          environment.resolveInTemplateLater(
                              tnode23,
                              "variableDeclaration",
                              new SNodePointer(
                                  "r:00000000-0000-4000-0000-011c89590606(jetbrains.mps.transformation.test.outputLang.generator.baseLanguage.template.main@generator)",
                                  "5015072279636761141"),
                              "tpl/r:00000000-0000-4000-0000-011c89590606/5015072279636761135",
                              "q",
                              context);

                        } finally {
                          environment
                              .getTracer()
                              .pushOutputNode(
                                  GenerationTracerUtil.getSNodePointer(
                                      environment.getOutputModel(), tnode23));
                          environment
                              .getTracer()
                              .closeTemplateNode(templateNode_kyghau_a0a0a1a3a1a3a1a4a1a5a1a7a1a1);
                        }
                        if (tnode23 != null) {
                          tnode22.addChild("lValue", tnode23);
                        }
                        // TODO validate child
                      }
                      {
                        final SNode tnode24 =
                            new SNode(
                                "jetbrains.mps.baseLanguage.structure.LocalVariableReference");
                        try {
                          environment
                              .getTracer()
                              .pushTemplateNode(templateNode_kyghau_a0a0a1a4a1a3a1a4a1a5a1a7a1a1);
                          environment.nodeCopied(
                              context,
                              tnode24,
                              "tpl/r:00000000-0000-4000-0000-011c89590606/5015072279636761145");
                          environment.resolveInTemplateLater(
                              tnode24,
                              "variableDeclaration",
                              new SNodePointer(
                                  "r:00000000-0000-4000-0000-011c89590606(jetbrains.mps.transformation.test.outputLang.generator.baseLanguage.template.main@generator)",
                                  "5015072279636761145"),
                              "tpl/r:00000000-0000-4000-0000-011c89590606/5015072279636761103",
                              "i",
                              context);

                        } finally {
                          environment
                              .getTracer()
                              .pushOutputNode(
                                  GenerationTracerUtil.getSNodePointer(
                                      environment.getOutputModel(), tnode24));
                          environment
                              .getTracer()
                              .closeTemplateNode(templateNode_kyghau_a0a0a1a4a1a3a1a4a1a5a1a7a1a1);
                        }
                        if (tnode24 != null) {
                          tnode22.addChild("rValue", tnode24);
                        }
                        // TODO validate child
                      }
                    } finally {
                      environment
                          .getTracer()
                          .pushOutputNode(
                              GenerationTracerUtil.getSNodePointer(
                                  environment.getOutputModel(), tnode22));
                      environment
                          .getTracer()
                          .closeTemplateNode(templateNode_kyghau_a0a0a1a3a1a4a1a5a1a7a1a1);
                    }
                    if (tnode22 != null) {
                      tnode21.addChild("expression", tnode22);
                    }
                    // TODO validate child
                  }
                } finally {
                  environment
                      .getTracer()
                      .pushOutputNode(
                          GenerationTracerUtil.getSNodePointer(
                              environment.getOutputModel(), tnode21));
                  environment
                      .getTracer()
                      .closeTemplateNode(templateNode_kyghau_a0a0a1a4a1a5a1a7a1a1);
                }
                if (tnode21 != null) {
                  tnode14.addChild("statement", tnode21);
                }
                // TODO validate child
              }
            } finally {
              environment
                  .getTracer()
                  .pushOutputNode(
                      GenerationTracerUtil.getSNodePointer(environment.getOutputModel(), tnode14));
              environment.getTracer().closeTemplateNode(templateNode_kyghau_a0a0a1a5a1a7a1a1);
            }
            if (tnode14 != null) {
              tnode11.addChild("body", tnode14);
            }
            // TODO validate child
          }
        } finally {
          environment
              .getTracer()
              .pushOutputNode(
                  GenerationTracerUtil.getSNodePointer(environment.getOutputModel(), tnode11));
          environment.getTracer().closeTemplateNode(templateNode_kyghau_a0a0a1a7a1a1);
        }
        if (tnode11 != null) {
          tnode1.addChild("constructor", tnode11);
        }
        // TODO validate child
      }
    } finally {
      environment
          .getTracer()
          .pushOutputNode(
              GenerationTracerUtil.getSNodePointer(environment.getOutputModel(), tnode1));
      environment.getTracer().closeTemplateNode(templateNode_kyghau_a0a0a1a1);
    }
    return TemplateUtil.singletonList(tnode1);
  }
Пример #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,
               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;
 }