Ejemplo n.º 1
0
 @Override
 public Collection<TemplateModule> getGenerators() {
   return TemplateUtil.<TemplateModule>asCollection(
       TemplateUtil.createInterpretedGenerator(
           this,
           "d80ca598-a981-465d-8e11-8c5532ebbad9(jetbrains.mps.vcs.mergehints#7313573869697832621)"));
 }
Ejemplo n.º 2
0
 @Override
 public Collection<TemplateModule> getGenerators() {
   return TemplateUtil.<TemplateModule>asCollection(
       TemplateUtil.createInterpretedGenerator(
           this,
           "b372f31d-dc58-46b6-ad0b-2e1b2e187b9d(jetbrains.mps.console.scripts#1734392475490224704)"));
 }
Ejemplo n.º 3
0
 @Override
 public Collection<TemplateModule> getGenerators() {
   return TemplateUtil.<TemplateModule>asCollection(
       TemplateUtil.createInterpretedGenerator(
           this,
           "3349c57b-62f9-4ce2-a22d-d9bd99edc6a6(jetbrains.mps.make.facet#5086995156117116954)"));
 }
Ejemplo n.º 4
0
 @Override
 public Collection<TemplateModule> getGenerators() {
   return TemplateUtil.<TemplateModule>asCollection(
       TemplateUtil.createInterpretedGenerator(
           this,
           "acd2a7bb-f207-4e80-800e-13dbbaebb046(jetbrains.mps.baseLanguage.builders#7057666463730688471)"));
 }
Ejemplo n.º 5
0
 @Override
 public Collection<TemplateModule> getGenerators() {
   return TemplateUtil.<TemplateModule>asCollection(
       TemplateUtil.createInterpretedGenerator(
           this,
           "a9b9fa8e-12f5-448d-b22d-5663c8206e2f(org.jetbrains.mps.samples.IfAndUnless#393299394024627256)"));
 }
Ejemplo n.º 6
0
 @Override
 public Collection<TemplateModule> getGenerators() {
   return TemplateUtil.<TemplateModule>asCollection(
       TemplateUtil.createInterpretedGenerator(
           this,
           "83dcee1d-5200-4734-aa72-fc872db9c947(jetbrains.mps.samples.generator_demo.demoLang5#3978102045101384263)"));
 }
Ejemplo n.º 7
0
 @Override
 public Collection<TemplateModule> getGenerators() {
   return TemplateUtil.<TemplateModule>asCollection(
       TemplateUtil.createInterpretedGenerator(
           this,
           "fead051a-767c-4c80-9582-25e0330f675a(jetbrains.mps.lang.dataFlow.analyzers#9177062368042328054)"));
 }
Ejemplo n.º 8
0
 @Override
 public Collection<TemplateModule> getGenerators() {
   return TemplateUtil.<TemplateModule>asCollection(
       TemplateUtil.createInterpretedGenerator(
           this,
           "7a7d58c9-ab9e-433c-bb4d-a8b1b2b20885(jetbrains.mps.lang.generator.generationParameters#650531548512001931)"));
 }
Ejemplo n.º 9
0
 public TemplateModelImpl(TemplateModule module) {
   super(module);
   mappings = TemplateUtil.<TemplateMappingConfiguration>asCollection(new Mappingmain(this));
   switches = TemplateUtil.<TemplateSwitchMapping>asCollection();
   model =
       PersistenceFacade.getInstance()
           .createModelReference(
               "r:00000000-0000-4000-0000-011c895905fa(jetbrains.mps.transformation.test.inputLang.generator.outputLang.template.test_weaveManyToSingularChild@generator)");
 }
Ejemplo n.º 10
0
 public Generator(Language sourceLanguage) {
   this.sourceLanguage = sourceLanguage;
   models =
       TemplateUtil.<TemplateModel>asCollection(
           getTemplateModel(
               "jetbrains.mps.transformation.test.outputLang.generator.baseLanguage.template.main.TemplateModelImpl"));
   usedLanguages =
       TemplateUtil.<String>asCollection(
           "jetbrains.mps.baseLanguage", "jetbrains.mps.transformation.test.outputLang");
 }
Ejemplo n.º 11
0
 public Generator(Language sourceLanguage) {
   this.sourceLanguage = sourceLanguage;
   models =
       TemplateUtil.<TemplateModel>asCollection(
           getTemplateModel(
               "jetbrains.mps.baseLanguage.jdk7.generator.template.main.TemplateModelImpl"));
   usedLanguages =
       TemplateUtil.<String>asCollection(
           "jetbrains.mps.baseLanguage", "jetbrains.mps.baseLanguageInternal");
 }
Ejemplo n.º 12
0
 @Override
 public Collection<SNode> apply(
     @NotNull TemplateExecutionEnvironment environment, @NotNull TemplateContext context)
     throws GenerationException {
   TemplateContext contextWithParams = context.subContext(getParametersAsMap());
   return TemplateUtil.singletonList(applyPart0(contextWithParams));
 }
Ejemplo n.º 13
0
 public Mapping_main(@NotNull TemplateModel model) {
   super(
       new SNodePointer(
           "r:592e27b6-d258-4bf2-9e32-25019862e1f1(jetbrains.mps.traceInfo.testWeavingGenerated.data.generator.template.main@generator)",
           "6186432342008486850"),
       "main",
       model,
       false);
   rootRules =
       TemplateUtil.<TemplateRootMappingRule>asCollection(new Mapping_main.RootMappingRule0());
   weavings =
       TemplateUtil.<TemplateWeavingRule>asCollection(
           new Mapping_main.WeavingRule0(),
           new Mapping_main.WeavingRule1(),
           new Mapping_main.WeavingRule2(),
           new Mapping_main.WeavingRule3());
   dropRules = TemplateUtil.<TemplateDropRootRule>asCollection(new Mapping_main.DropRootRule0());
 }
Ejemplo n.º 14
0
 @Override
 public Collection<SNode> apply(@NotNull final TemplateContext context)
     throws GenerationException {
   final TemplateExecutionEnvironment environment = context.getEnvironment();
   Collection<SNode> tlist1 = null;
   if (QueriesGenerated.baseMappingRule_Condition_1195172400866(
       new BaseMappingRuleContext(context, rule_ief6mt_b0a0c0c11))) {
     final SNode tnode2 =
         environment.createOutputNode(
             MetaAdapterFactory.getConcept(
                 0x157a9668bf58417bL,
                 0x893e53d86388dc56L,
                 0x1164564a526L,
                 "jetbrains.mps.transformation.test.outputLang.structure.OutputNode"));
     try {
       SNodeAccessUtil.setProperty(
           tnode2,
           MetaAdapterFactory.getProperty(
               0x157a9668bf58417bL, 0x893e53d86388dc56L, 0x1164564a526L, 0x11645b5a797L, "text"),
           "<input option : 1>");
     } finally {
     }
     tlist1 = TemplateUtil.singletonList(tnode2);
   } else {
     final SNode tnode3 =
         environment.createOutputNode(
             MetaAdapterFactory.getConcept(
                 0x157a9668bf58417bL,
                 0x893e53d86388dc56L,
                 0x1164564a526L,
                 "jetbrains.mps.transformation.test.outputLang.structure.OutputNode"));
     try {
       SNodeAccessUtil.setProperty(
           tnode3,
           MetaAdapterFactory.getProperty(
               0x157a9668bf58417bL, 0x893e53d86388dc56L, 0x1164564a526L, 0x11645b5a797L, "text"),
           "<input option : default>");
     } finally {
     }
     tlist1 = TemplateUtil.singletonList(tnode3);
   }
   return tlist1;
 }
Ejemplo n.º 15
0
 public TemplateDeclaration loadTemplate(SNodeReference template, Object... arguments) {
   if (!(model.equals(template.getModelReference()))) {
     return null;
   }
   if (template.equals(
       new SNodePointer(
           "r:00000000-0000-4000-0000-011c895905fa(jetbrains.mps.transformation.test.inputLang.generator.outputLang.template.test_weaveManyToSingularChild@generator)",
           "1218738992784"))) {
     TemplateUtil.assertTemplateParametersCount(template, 0, arguments.length);
     return new Templateweave__InputNode__A();
   }
   if (template.equals(
       new SNodePointer(
           "r:00000000-0000-4000-0000-011c895905fa(jetbrains.mps.transformation.test.inputLang.generator.outputLang.template.test_weaveManyToSingularChild@generator)",
           "1218738789586"))) {
     TemplateUtil.assertTemplateParametersCount(template, 0, arguments.length);
     return new Templatemap__outputNode();
   }
   return null;
 }
Ejemplo n.º 16
0
 public Mapping_main(@NotNull TemplateModel model) {
   super(
       new SNodePointer(
           "r:00000000-0000-4000-0000-011c895905f6(jetbrains.mps.transformation.test.inputLang.generator.outputLang.template.test_generationScripts@generator)",
           "1195164863269"),
       "main",
       model,
       false);
   rules =
       TemplateUtil.<TemplateReductionRule>asCollection(
           new Mapping_main.ReductionRule0(), new Mapping_main.ReductionRule1());
   createRules =
       TemplateUtil.<TemplateCreateRootRule>asCollection(new Mapping_main.CreateRootRule0());
   rootRules =
       TemplateUtil.<TemplateRootMappingRule>asCollection(new Mapping_main.RootMappingRule0());
   preScripts =
       TemplateUtil.<TemplateMappingScript>asCollection(new Script_test_preMappingScript());
   postScripts =
       TemplateUtil.<TemplateMappingScript>asCollection(new Script_test_postMappingScript());
 }
Ejemplo n.º 17
0
 public Collection<SNode> weave(
     @NotNull TemplateExecutionEnvironment environment,
     @NotNull TemplateContext context,
     @NotNull SNode outputContextNode)
     throws GenerationException {
   TemplateContext contextWithParams = context.subContext(getParametersAsMap());
   SNode tnodepart0 = applyPart0(environment, contextWithParams);
   SNodeReference weaveTf0 = weaveTfConst_nofsa1_a0c0g;
   environment.weaveNode(
       outputContextNode, "initializer", tnodepart0, weaveTf0, contextWithParams.getInput());
   return TemplateUtil.singletonList(tnodepart0);
 }
Ejemplo n.º 18
0
 @Override
 public Collection<SNode> weave(
     @NotNull NodeWeaveFacility.WeaveContext weaveContext, @NotNull NodeWeaveFacility weaveSupport)
     throws GenerationException {
   final TemplateContext templateContext = weaveSupport.getTemplateContext();
   SNode tnodepart0 = applyPart0(templateContext);
   weaveSupport.weaveNode(
       MetaAdapterFactory.getContainmentLink(
           0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37a7f6eL, 0xf8c37f506eL, "initializer"),
       tnodepart0);
   return TemplateUtil.singletonList(tnodepart0);
 }
Ejemplo n.º 19
0
 @Override
 public Collection<SNode> weave(
     @NotNull NodeWeaveFacility.WeaveContext weaveContext, @NotNull NodeWeaveFacility weaveSupport)
     throws GenerationException {
   final TemplateContext templateContext =
       weaveSupport.getTemplateContext().subContext(getParametersAsMap());
   SNode tnodepart0 = applyPart0(templateContext);
   weaveSupport.weaveNode(
       MetaAdapterFactory.getContainmentLink(
           0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b200L, 0xf8cc6bf961L, "statement"),
       tnodepart0);
   return TemplateUtil.singletonList(tnodepart0);
 }
Ejemplo n.º 20
0
 public Generator(Language sourceLanguage) {
   this.sourceLanguage = sourceLanguage;
   priorities =
       TemplateUtil.asCollection(
           TemplateUtil.createStrictlyBeforeRule(
               TemplateUtil.createRefExternal(
                   "791a790e-6d6d-4aa8-8917-3b269a164450(jetbrains.mps.traceInfo.tracemacro.testlang#7980748436587788163)",
                   TemplateUtil.createRefNormal(
                       "r:75f95d80-1d60-4222-8b1e-a09f089fee3e(jetbrains.mps.traceInfo.tracemacro.testlang.generator.template.main@generator)",
                       "*")),
               TemplateUtil.createRefExternal(
                   "5f9babc9-8d5d-4825-8e61-17b241ee6272(jetbrains.mps.baseLanguage.collections#1151699677197)",
                   TemplateUtil.createRefLocal())));
   models =
       TemplateUtil.<TemplateModel>asCollection(
           getTemplateModel(
               "jetbrains.mps.traceInfo.tracemacro.testlang.generator.template.main.TemplateModelImpl"));
   referencedGenerators =
       TemplateUtil.<String>asCollection(
           "jetbrains.mps.baseLanguage.collections/jetbrains.mps.baseLanguage.collections#1151699677197");
   usedLanguages =
       TemplateUtil.<String>asCollection(
           "jetbrains.mps.baseLanguage", "jetbrains.mps.baseLanguage.collections");
 }
 public Collection<SNode> weave(
     @NotNull TemplateExecutionEnvironment environment,
     @NotNull TemplateContext context,
     @NotNull SNode outputContextNode)
     throws GenerationException {
   SNode tnodepart0 = applyPart0(environment, context);
   SNodeReference weaveTf0 =
       new SNodePointer(
           "r:592e27b6-d258-4bf2-9e32-25019862e1f1(jetbrains.mps.traceInfo.testWeavingGenerated.data.generator.template.main@generator)",
           "6186432342008522553");
   NodeWeaveFacility weaveSupport0 = environment.weaveNode(context, weaveTf0);
   weaveSupport0.weave(
       outputContextNode,
       MetaAdapterFactory.getContainmentLink(
           0xf3061a5392264cc5L,
           0xa443f952ceaf5816L,
           0x101d9d3ca30L,
           0x4a9a46de59132803L,
           "member"),
       tnodepart0);
   return TemplateUtil.singletonList(tnodepart0);
 }
Ejemplo n.º 22
0
 public Collection<TemplateModule> getGenerators() {
   return TemplateUtil.<TemplateModule>asCollection(
       TemplateUtil.createInterpretedGenerator(
           this,
           "2f4c5ebf-446e-468d-9e74-a64cbeb906c0(jetbrains.mps.debug.customViewers#4089989733346806812)"));
 }
Ejemplo n.º 23
0
 public Collection<TemplateModule> getGenerators() {
   return TemplateUtil.<TemplateModule>asCollection(
       TemplateUtil.createInterpretedGenerator(
           this, "0e7e6e38-fc52-4859-a8a9-7c262a5ee452(jetbrains.mps.lang.script#1172274134493)"));
 }
Ejemplo n.º 24
0
 public Collection<TemplateModule> getGenerators() {
   return TemplateUtil.<TemplateModule>asCollection(
       TemplateUtil.createInterpretedGenerator(
           this,
           "39d44af6-f60e-499c-a201-583451e7fad0(jetbrains.mps.build.workflow#2769948622284786808)"));
 }
Ejemplo n.º 25
0
 public Collection<TemplateModule> getGenerators() {
   return TemplateUtil.<TemplateModule>asCollection(
       TemplateUtil.createInterpretedGenerator(
           this,
           "dca5c40a-5151-4f95-a465-70f40cd5f026(jetbrains.mps.build.dependency#1216906826567)"));
 }
Ejemplo n.º 26
0
 @Override
 public Collection<TemplateModule> getGenerators() {
   return TemplateUtil.<TemplateModule>asCollection(
       TemplateUtil.createInterpretedGenerator(
           this, "027055fb-d4b6-44ba-bf0d-4dcf53312089(mps.demo.calc#3541037617674586680)"));
 }
Ejemplo n.º 27
0
 @Override
 public Collection<SNode> apply(
     @NotNull TemplateExecutionEnvironment environment, @NotNull TemplateContext context)
     throws GenerationException {
   return TemplateUtil.singletonList(applyPart0(context));
 }
Ejemplo n.º 28
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;
 }
Ejemplo n.º 29
0
 @Override
 public Collection<TemplateModule> getGenerators() {
   return TemplateUtil.<TemplateModule>asCollection(
       TemplateUtil.createInterpretedGenerator(
           this, "83ede959-ca7a-4d58-b7f6-ca2b24865e4d(testPrimitiveType#706089536801030402)"));
 }
Ejemplo n.º 30
0
 public Collection<TemplateModule> getGenerators() {
   return TemplateUtil.<TemplateModule>asCollection(
       TemplateUtil.createInterpretedGenerator(
           this,
           "ae6a71ff-9b6b-4518-969c-289320a7c8e2(jetbrains.mps.core.properties#6896005762093550227)"));
 }