package jetbrains.mps.lang.descriptor.generator.template.main; /*Generated by MPS */ import jetbrains.mps.generator.runtime.Generated; import jetbrains.mps.generator.runtime.TemplateDeclarationBase; import jetbrains.mps.generator.runtime.TemplateDeclaration; import org.jetbrains.mps.openapi.model.SNodeReference; import java.util.Collection; import org.jetbrains.mps.openapi.model.SNode; import org.jetbrains.annotations.NotNull; import jetbrains.mps.generator.runtime.TemplateExecutionEnvironment; import jetbrains.mps.generator.runtime.TemplateContext; import jetbrains.mps.generator.runtime.GenerationException; import org.jetbrains.mps.openapi.model.SNodeAccessUtil; import jetbrains.mps.generator.template.InsertMacroContext; import jetbrains.mps.generator.runtime.TemplateUtil; import org.jetbrains.mps.openapi.language.SConcept; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import org.jetbrains.mps.openapi.language.SProperty; import org.jetbrains.mps.openapi.language.SContainmentLink; import jetbrains.mps.smodel.SNodePointer; @Generated public class Template_language_descriptor extends TemplateDeclarationBase implements TemplateDeclaration { public Template_language_descriptor() { } public SNodeReference getTemplateNode() { return template_xu4w5k_a0a3; } public Collection<SNode> apply(@NotNull final TemplateExecutionEnvironment environment, @NotNull final TemplateContext context) throws GenerationException { final SNode tnode1 = environment.createOutputNode(myConcepts[0]); try { environment.nodeCopied(context, tnode1, "tpl/r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508/1698302279987411125"); SNodeAccessUtil.setProperty(tnode1, myProperties[0], "descriputor"); TemplateContext context1 = context.subContext(); { SNode tnode2 = null; final SNode insertInput2 = QueriesGenerated.insertMacro_Query_1509962061695074412(new InsertMacroContext(context1, insertMacro_xu4w5k_b0a0a1a3a1a4)); if (insertInput2 != null) { tnode2 = environment.insertNode(insertInput2, insertMacro_xu4w5k_b0a0a1a3a1a4, context1); } if (tnode2 != null) { tnode1.addChild(myAggregationLinks[0], tnode2); } // TODO validate child } } finally { } return TemplateUtil.singletonList(tnode1); } @Override protected SConcept[] initConcepts() { SConcept[] rv = new SConcept[1]; rv[0] = MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf4ad079dbc714ffbL, 0x96009328705cf998L, "jetbrains.mps.lang.descriptor"), 0x7d2f7947ef1533a5L, "LanguageDescriptor"); return rv; } @Override protected SProperty[] initProperties() { SProperty[] rv = new SProperty[1]; rv[0] = MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"); return rv; } @Override protected SContainmentLink[] initAggregationLinks() { SContainmentLink[] rv = new SContainmentLink[1]; rv[0] = MetaAdapterFactory.getContainmentLink(0xf4ad079dbc714ffbL, 0x96009328705cf998L, 0x7d2f7947ef1533a5L, 0x179194ecf7e0953bL, "language"); return rv; } private static SNodePointer template_xu4w5k_a0a3 = new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1698302279987411125"); private static SNodePointer insertMacro_xu4w5k_b0a0a1a3a1a4 = new SNodePointer("r:1dfaf07d-c77a-451e-91d3-b6f80f0f8508(jetbrains.mps.lang.descriptor.generator.template.main@generator)", "1509962061695074411"); }