private static SNode _quotation_createNode_qzfpnd_a0a0c0a(Object parameter_1) {
   SNode quotedNode_2 = null;
   SNode quotedNode_3 = null;
   SNode quotedNode_4 = null;
   quotedNode_2 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.closures.structure.FunctionType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_3 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.collections.structure.SequenceType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_4 = (SNode) parameter_1;
   if (quotedNode_4 != null) {
     quotedNode_3.addChild("elementType", HUtil.copyIfNecessary(quotedNode_4));
   }
   quotedNode_2.addChild("resultType", quotedNode_3);
   return quotedNode_2;
 }
 public SNode createNode() {
   SNode result = null;
   Set<SNode> _parameterValues_129834374 = new HashSet<SNode>();
   SNode quotedNode_1 = null;
   SNode quotedNode_2 = null;
   SNode quotedNode_3 = null;
   SNode quotedNode_4 = null;
   {
     quotedNode_1 =
         SModelUtil_new.instantiateConceptDeclaration(
             "jetbrains.mps.baseLanguage.tuples.structure.IndexedTupleType",
             null,
             GlobalScope.getInstance(),
             false);
     SNode quotedNode1_5 = quotedNode_1;
     {
       quotedNode_2 =
           SModelUtil_new.instantiateConceptDeclaration(
               "jetbrains.mps.baseLanguage.structure.ClassifierType",
               null,
               GlobalScope.getInstance(),
               false);
       SNode quotedNode1_6 = quotedNode_2;
       quotedNode1_6.addReference(
           SReference.create(
               "classifier",
               quotedNode1_6,
               SModelReference.fromString(
                   "f:java_stub#6354ebe7-c22a-4a0f-ac54-50b52ab9b065#javax.swing(JDK/javax.swing@java_stub)"),
               SNodeId.fromString("~JComponent")));
       quotedNode_1.addChild("componentType", quotedNode1_6);
     }
     {
       quotedNode_3 =
           SModelUtil_new.instantiateConceptDeclaration(
               "jetbrains.mps.baseLanguage.closures.structure.FunctionType",
               null,
               GlobalScope.getInstance(),
               false);
       SNode quotedNode1_7 = quotedNode_3;
       {
         quotedNode_4 =
             SModelUtil_new.instantiateConceptDeclaration(
                 "jetbrains.mps.baseLanguage.structure.VoidType",
                 null,
                 GlobalScope.getInstance(),
                 false);
         SNode quotedNode1_8 = quotedNode_4;
         quotedNode_3.addChild("resultType", quotedNode1_8);
       }
       quotedNode_1.addChild("componentType", quotedNode1_7);
     }
     result = quotedNode1_5;
   }
   return result;
 }
 public SNode createNode(Object parameter_5, final TypeCheckingContext typeCheckingContext) {
   SNode result = null;
   Set<SNode> _parameterValues_129834374 = new HashSet<SNode>();
   SNode quotedNode_1 = null;
   SNode quotedNode_2 = null;
   {
     quotedNode_1 =
         SModelUtil_new.instantiateConceptDeclaration(
             "jetbrains.mps.baseLanguage.collections.structure.SequenceType",
             null,
             GlobalScope.getInstance(),
             false);
     SNode quotedNode1_3 = quotedNode_1;
     {
       quotedNode_2 = (SNode) parameter_5;
       SNode quotedNode1_4;
       if (_parameterValues_129834374.contains(quotedNode_2)) {
         quotedNode1_4 = HUtil.copyIfNecessary(quotedNode_2, typeCheckingContext);
       } else {
         _parameterValues_129834374.add(quotedNode_2);
         quotedNode1_4 = quotedNode_2;
       }
       if (quotedNode1_4 != null) {
         quotedNode_1.addChild(
             "elementType", HUtil.copyIfNecessary(quotedNode1_4, typeCheckingContext));
       }
     }
     result = quotedNode1_3;
   }
   return result;
 }
    public void test_removeChild() throws Exception {
      this.addNodeById("8150353254540236423");
      this.addNodeById("8150353254540236549");
      this.addNodeById("4195712261513743410");
      SNode sNode =
          SNodeOperations.cast(
              this.getNodeById("8150353254540236424"),
              "jetbrains.mps.baseLanguage.structure.BlockStatement");
      SNode child =
          SNodeOperations.cast(
              this.getNodeById("8150353254540236551"),
              "jetbrains.mps.baseLanguage.structure.LocalVariableDeclarationStatement");
      child.getParent().removeChild(child);
      sNode.addChild("", child);

      StatCountNodeReadAccessInEditorListener listener =
          new StatCountNodeReadAccessInEditorListener(sNode);
      NodeReadAccessCasterInEditor.setCellBuildNodeReadAccessListener(listener);

      sNode.removeChild(child);

      this.assertMethod(
          "public void jetbrains.mps.smodel.SNode.removeChild(org.jetbrains.mps.openapi.model.SNode)",
          listener.getResults().o1);
    }
 public SNode createNode(final TypeCheckingContext typeCheckingContext) {
   SNode result = null;
   Set<SNode> _parameterValues_129834374 = new HashSet<SNode>();
   SNode quotedNode_1 = null;
   SNode quotedNode_2 = null;
   {
     quotedNode_1 =
         SModelUtil_new.instantiateConceptDeclaration(
             "jetbrains.mps.baseLanguage.collections.structure.ListType",
             null,
             GlobalScope.getInstance(),
             false);
     SNode quotedNode1_3 = quotedNode_1;
     {
       quotedNode_2 =
           SModelUtil_new.instantiateConceptDeclaration(
               "jetbrains.mps.lang.smodel.structure.SNodeType",
               null,
               GlobalScope.getInstance(),
               false);
       SNode quotedNode1_4 = quotedNode_2;
       quotedNode_1.addChild("elementType", quotedNode1_4);
     }
     result = quotedNode1_3;
   }
   return result;
 }
 public SNode createNode(Object parameter_7, Object parameter_8) {
   SNode result = null;
   Set<SNode> _parameterValues_129834374 = new HashSet<SNode>();
   SNode quotedNode_1 = null;
   SNode quotedNode_2 = null;
   SNode quotedNode_3 = null;
   {
     quotedNode_1 =
         SModelUtil_new.instantiateConceptDeclaration(
             "jetbrains.mps.baseLanguage.collections.structure.MapType",
             null,
             GlobalScope.getInstance(),
             false);
     SNode quotedNode1_4 = quotedNode_1;
     {
       quotedNode_2 = (SNode) parameter_7;
       SNode quotedNode1_5;
       if (_parameterValues_129834374.contains(quotedNode_2)) {
         quotedNode1_5 = HUtil.copyIfNecessary(quotedNode_2);
       } else {
         _parameterValues_129834374.add(quotedNode_2);
         quotedNode1_5 = quotedNode_2;
       }
       if (quotedNode1_5 != null) {
         quotedNode_1.addChild("keyType", HUtil.copyIfNecessary(quotedNode1_5));
       }
     }
     {
       quotedNode_3 = (SNode) parameter_8;
       SNode quotedNode1_6;
       if (_parameterValues_129834374.contains(quotedNode_3)) {
         quotedNode1_6 = HUtil.copyIfNecessary(quotedNode_3);
       } else {
         _parameterValues_129834374.add(quotedNode_3);
         quotedNode1_6 = quotedNode_3;
       }
       if (quotedNode1_6 != null) {
         quotedNode_1.addChild("valueType", HUtil.copyIfNecessary(quotedNode1_6));
       }
     }
     result = quotedNode1_4;
   }
   return result;
 }
 private static SNode _quotation_createNode_20awhq_a0a1a5a0(Object parameter_1) {
   SNode quotedNode_2 = null;
   SNode quotedNode_3 = null;
   SNode quotedNode_4 = null;
   SNode quotedNode_5 = null;
   quotedNode_2 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.build.workflow.structure.BwfAntStatement",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_3 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.core.xml.structure.XmlElement",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_3.setProperty("tagName", "mkdir");
   quotedNode_3.setProperty("shortEmptyNotation", "true");
   quotedNode_4 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.core.xml.structure.XmlAttribute",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_4.setProperty("attrName", "dir");
   quotedNode_5 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.core.xml.structure.XmlTextValue",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_5.setProperty("text", (String) parameter_1);
   quotedNode_4.addChild("value", quotedNode_5);
   quotedNode_3.addChild("attributes", quotedNode_4);
   quotedNode_2.addChild("element", quotedNode_3);
   return quotedNode_2;
 }
Beispiel #8
0
 private static SNode _quotation_createNode_w9106s_a0c0e(Object parameter_1, Object parameter_2) {
   SNode quotedNode_3 = null;
   SNode quotedNode_4 = null;
   SNode quotedNode_5 = null;
   SNode quotedNode_6 = null;
   quotedNode_3 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.lang.typesystem.structure.JoinType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_4 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.collections.structure.SequenceType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_6 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.lang.smodel.structure.SNodeType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_6.setReferenceTarget("concept", (SNode) parameter_1);
   quotedNode_4.addChild("elementType", quotedNode_6);
   quotedNode_3.addChild("argument", quotedNode_4);
   quotedNode_5 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.lang.smodel.structure.SNodeType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_5.setReferenceTarget("concept", (SNode) parameter_2);
   quotedNode_3.addChild("argument", quotedNode_5);
   return quotedNode_3;
 }
Beispiel #9
0
    @Override
    protected void handleChild(Object resultObject, String tagName, Object value)
        throws SAXException {
      SNode result = (SNode) resultObject;
      if ("property".equals(tagName)) {
        String[] child = (String[]) value;
        if (child[1] != null) {
          result.setProperty(fieldhelper.readName(child[0]), child[1], false);
          fieldlinkMap.addNameLocation(fieldhelper.readLinkId(child[2]), result, child[0]);
        }
        return;
      }
      if ("link".equals(tagName)) {
        String[] child = (String[]) value;
        Pair<Boolean, SNodePointer> pptr = fieldhelper.readLink_internal(child[1]);
        SNodePointer ptr = pptr.o2;
        if (ptr == null || ptr.getModelReference() == null) {
          if (log.isErrorEnabled()) {
            log.error("couldn't create reference '" + child[0] + "' from " + child[1]);
          }
          return;
        }
        /*
          SReference ref;
          if (pptr.o1) {
            ref = new DynamicReference(fieldhelper.readRole(child[0]), result, ptr.getModelReference(), child[2]);
            fieldlinkMap.addDynamicReference(ptr.getModelReference(), (DynamicReference) ref);
          } else {
            ref = new StaticReference(fieldhelper.readRole(child[0]), result, ptr.getModelReference(), ptr.getNodeId(), child[2]);
            fieldlinkMap.addTargetLocation(ptr, (StaticReference) ref);
          }
        */
        StaticReference ref =
            new StaticReference(
                fieldhelper.readRole(child[0]),
                result,
                ptr.getModelReference(),
                ptr.getNodeId(),
                child[2]);
        fieldlinkMap.addTargetLocation(ptr, ref);

        result.addReference(ref);
        fieldlinkMap.addRoleLocation(fieldhelper.readLinkId(child[3]), ref);
        return;
      }
      if ("node".equals(tagName)) {
        SNode child = (SNode) value;
        result.addChild(child.getRole_(), child);
        return;
      }
      super.handleChild(resultObject, tagName, value);
    }
Beispiel #10
0
 @Override
 protected void handleChild(Object resultObject, String tagName, Object value)
     throws SAXException {
   SNode result = (SNode) resultObject;
   if ("node".equals(tagName)) {
     SNode child = (SNode) value;
     if (child != null) {
       result.addChild(child.getRole_(), child);
     }
     return;
   }
   super.handleChild(resultObject, tagName, value);
 }
 private static SNode _quotation_createNode_832k9i_a0a0(Object parameter_1) {
   SNode quotedNode_2 = null;
   SNode quotedNode_3 = null;
   quotedNode_2 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.collections.structure.CollectionType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_3 = (SNode) parameter_1;
   if (quotedNode_3 != null) {
     quotedNode_2.addChild("elementType", HUtil.copyIfNecessary(quotedNode_3));
   }
   return quotedNode_2;
 }
 private static SNode _quotation_createNode_h7rq16_a0a0a() {
   SNode quotedNode_1 = null;
   SNode quotedNode_2 = null;
   quotedNode_1 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.collections.structure.ListType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_2 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.lang.smodel.structure.SNodeType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_1.addChild("elementType", quotedNode_2);
   return quotedNode_1;
 }
 private static SNode _quotation_createNode_trqwsu_a0a0a(Object parameter_1) {
   SNode quotedNode_2 = null;
   SNode quotedNode_3 = null;
   quotedNode_2 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.collections.structure.ListType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_3 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.lang.smodel.structure.SEnumMemberType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_3.setReferenceTarget("enum", (SNode) parameter_1);
   quotedNode_2.addChild("elementType", quotedNode_3);
   return quotedNode_2;
 }
 private static SNode _quotation_createNode_5hdosv_b0a0b0a() {
   SNode quotedNode_1 = null;
   SNode quotedNode_2 = null;
   quotedNode_1 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.ClassifierType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_1.setReference(
       "classifier",
       SReference.create(
           "classifier",
           quotedNode_1,
           SModelReference.fromString(
               "f:java_stub#6354ebe7-c22a-4a0f-ac54-50b52ab9b065#java.lang(JDK/java.lang@java_stub)"),
           SNodeId.fromString("~Iterable")));
   quotedNode_2 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.ClassifierType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_2.setReference(
       "classifier",
       SReference.create(
           "classifier",
           quotedNode_2,
           SModelReference.fromString(
               "f:java_stub#6ed54515-acc8-4d1e-a16c-9fd6cfe951ea#jetbrains.mps.lang.script.runtime(MPS.Core/jetbrains.mps.lang.script.runtime@java_stub)"),
           SNodeId.fromString("~AbstractMigrationRefactoring")));
   quotedNode_1.addChild("parameter", quotedNode_2);
   return quotedNode_1;
 }
 private static SNode _quotation_createNode_sacma3_a0b0a(Object parameter_1) {
   SNode quotedNode_2 = null;
   SNode quotedNode_3 = null;
   SNode quotedNode_4 = null;
   SNode quotedNode_5 = null;
   SNode quotedNode_6 = null;
   SNode quotedNode_7 = null;
   quotedNode_2 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.lang.typesystem.structure.JoinType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_3 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.ClassifierType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_3.setReference(
       "classifier",
       SReference.create(
           "classifier",
           quotedNode_3,
           SModelReference.fromString(
               "f:java_stub#6354ebe7-c22a-4a0f-ac54-50b52ab9b065#java.lang(JDK/java.lang@java_stub)"),
           SNodeId.fromString("~Cloneable")));
   quotedNode_2.addChild("argument", quotedNode_3);
   quotedNode_4 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.ClassifierType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_4.setReference(
       "classifier",
       SReference.create(
           "classifier",
           quotedNode_4,
           SModelReference.fromString(
               "f:java_stub#6354ebe7-c22a-4a0f-ac54-50b52ab9b065#java.lang(JDK/java.lang@java_stub)"),
           SNodeId.fromString("~Enum")));
   quotedNode_2.addChild("argument", quotedNode_4);
   quotedNode_5 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.ClassifierType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_5.setReference(
       "classifier",
       SReference.create(
           "classifier",
           quotedNode_5,
           SModelReference.fromString(
               "f:java_stub#6354ebe7-c22a-4a0f-ac54-50b52ab9b065#java.lang(JDK/java.lang@java_stub)"),
           SNodeId.fromString("~String")));
   quotedNode_2.addChild("argument", quotedNode_5);
   quotedNode_6 = (SNode) parameter_1;
   if (quotedNode_6 != null) {
     quotedNode_2.addChild("argument", HUtil.copyIfNecessary(quotedNode_6));
   }
   quotedNode_7 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.execution.settings.structure.TemplatePersistentConfigurationType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_2.addChild("argument", quotedNode_7);
   return quotedNode_2;
 }
Beispiel #16
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);
  }