package jetbrains.mps.lang.behavior.generator.template.main; /*Generated by MPS */ import jetbrains.mps.generator.runtime.Generated; import jetbrains.mps.generator.runtime.MapConfigBase; import jetbrains.mps.generator.runtime.TemplateMappingConfiguration; import java.util.Collection; import jetbrains.mps.generator.runtime.TemplateReductionRule; import jetbrains.mps.generator.runtime.TemplateCreateRootRule; import jetbrains.mps.generator.runtime.TemplateRootMappingRule; import org.jetbrains.annotations.NotNull; import jetbrains.mps.generator.runtime.TemplateModel; import jetbrains.mps.smodel.SNodePointer; import jetbrains.mps.generator.runtime.TemplateUtil; import jetbrains.mps.generator.runtime.ReductionRuleBase; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import org.jetbrains.mps.openapi.model.SNode; import jetbrains.mps.generator.runtime.TemplateContext; import jetbrains.mps.generator.runtime.GenerationException; import jetbrains.mps.generator.runtime.TemplateExecutionEnvironment; import jetbrains.mps.generator.runtime.MapRootRuleBase; import jetbrains.mps.generator.runtime.CreateRootRuleBase; import jetbrains.mps.generator.template.CreateRootRuleContext; import jetbrains.mps.generator.impl.DefaultTemplateContext; @Generated public class Mapping_mc_Behavior extends MapConfigBase implements TemplateMappingConfiguration { private final Collection<TemplateReductionRule> rules; private final Collection<TemplateCreateRootRule> createRules; private final Collection<TemplateRootMappingRule> rootRules; public Mapping_mc_Behavior(@NotNull TemplateModel model) { super(new SNodePointer("r:229ce18d-2bb0-4d5b-a7cd-cec65841e459(jetbrains.mps.lang.behavior.generator.template.main@generator)", "1225195370950"), "mc_Behavior", model, false); rules = TemplateUtil.<TemplateReductionRule>asCollection(new Mapping_mc_Behavior.ReductionRule0(), new Mapping_mc_Behavior.ReductionRule1(), new Mapping_mc_Behavior.ReductionRule2(), new Mapping_mc_Behavior.ReductionRule3(), new Mapping_mc_Behavior.ReductionRule4()); createRules = TemplateUtil.<TemplateCreateRootRule>asCollection(new Mapping_mc_Behavior.CreateRootRule0()); rootRules = TemplateUtil.<TemplateRootMappingRule>asCollection(new Mapping_mc_Behavior.RootMappingRule0()); } @Override public Collection<TemplateReductionRule> getReductionRules() { return rules; } @Override public Collection<TemplateCreateRootRule> getCreateRules() { return createRules; } @Override public Collection<TemplateRootMappingRule> getRootRules() { return rootRules; } public final class ReductionRule0 extends ReductionRuleBase { public ReductionRule0() { super(new SNodePointer("r:229ce18d-2bb0-4d5b-a7cd-cec65841e459(jetbrains.mps.lang.behavior.generator.template.main@generator)", "1225195370951"), MetaAdapterFactory.getConcept(0xaf65afd8f0dd4942L, 0x87d963a55f2a9db1L, 0x11d434b5be1L, "jetbrains.mps.lang.behavior.structure.ThisNodeExpression"), false); } @Override public Collection<SNode> apply(@NotNull final TemplateContext context) throws GenerationException { final TemplateExecutionEnvironment environment = context.getEnvironment(); Collection<SNode> tlist1 = new Template_reduce_ThisNodeExpression().apply(environment, context); return tlist1; } } public final class ReductionRule1 extends ReductionRuleBase { public ReductionRule1() { super(new SNodePointer("r:229ce18d-2bb0-4d5b-a7cd-cec65841e459(jetbrains.mps.lang.behavior.generator.template.main@generator)", "1703835097132694820"), MetaAdapterFactory.getConcept(0xaf65afd8f0dd4942L, 0x87d963a55f2a9db1L, 0x17a53cfe586da642L, "jetbrains.mps.lang.behavior.structure.ThisConceptExpression"), false); } @Override public Collection<SNode> apply(@NotNull final TemplateContext context) throws GenerationException { final TemplateExecutionEnvironment environment = context.getEnvironment(); Collection<SNode> tlist1 = new Template_reduce_ThisConceptExpression().apply(environment, context); return tlist1; } } public final class ReductionRule2 extends ReductionRuleBase { public ReductionRule2() { super(new SNodePointer("r:229ce18d-2bb0-4d5b-a7cd-cec65841e459(jetbrains.mps.lang.behavior.generator.template.main@generator)", "1225195370953"), MetaAdapterFactory.getConcept(0xaf65afd8f0dd4942L, 0x87d963a55f2a9db1L, 0x11d434a6558L, "jetbrains.mps.lang.behavior.structure.SuperNodeExpression"), false); } @Override public Collection<SNode> apply(@NotNull final TemplateContext context) throws GenerationException { final TemplateExecutionEnvironment environment = context.getEnvironment(); Collection<SNode> tlist1 = new Template_reduce_SuperNodeExpression().apply(environment, context); return tlist1; } } public final class ReductionRule3 extends ReductionRuleBase { public ReductionRule3() { super(new SNodePointer("r:229ce18d-2bb0-4d5b-a7cd-cec65841e459(jetbrains.mps.lang.behavior.generator.template.main@generator)", "7613853987897918223"), MetaAdapterFactory.getConcept(0xaf65afd8f0dd4942L, 0x87d963a55f2a9db1L, 0x69a9d7dcb057a7a7L, "jetbrains.mps.lang.behavior.structure.SuperConceptExpression"), false); } @Override public Collection<SNode> apply(@NotNull final TemplateContext context) throws GenerationException { final TemplateExecutionEnvironment environment = context.getEnvironment(); Collection<SNode> tlist1 = new Template_reduce_SuperConceptExpression().apply(environment, context); return tlist1; } } public final class ReductionRule4 extends ReductionRuleBase { public ReductionRule4() { super(new SNodePointer("r:229ce18d-2bb0-4d5b-a7cd-cec65841e459(jetbrains.mps.lang.behavior.generator.template.main@generator)", "4731970554579986848"), MetaAdapterFactory.getConcept(0xaf65afd8f0dd4942L, 0x87d963a55f2a9db1L, 0x5a277db47d54d7e1L, "jetbrains.mps.lang.behavior.structure.LocalBehaviorMethodCall"), false); } @Override public Collection<SNode> apply(@NotNull final TemplateContext context) throws GenerationException { final TemplateExecutionEnvironment environment = context.getEnvironment(); Collection<SNode> tlist1 = new Template_reduce_LocalBehaviorMethodCallWithCast().apply(environment, context); return tlist1; } } public class RootMappingRule0 extends MapRootRuleBase implements TemplateRootMappingRule { public RootMappingRule0() { super(new SNodePointer("r:229ce18d-2bb0-4d5b-a7cd-cec65841e459(jetbrains.mps.lang.behavior.generator.template.main@generator)", "1225195370955"), MetaAdapterFactory.getConcept(0xaf65afd8f0dd4942L, 0x87d963a55f2a9db1L, 0x11d43447b1aL, "jetbrains.mps.lang.behavior.structure.ConceptBehavior"), false, false); } @Override public Collection<SNode> apply(@NotNull final TemplateContext context) throws GenerationException { final TemplateExecutionEnvironment environment = context.getEnvironment(); Collection<SNode> result = new Template_BehaviorDescriptor().apply(environment, context); return result; } } public class CreateRootRule0 extends CreateRootRuleBase implements TemplateCreateRootRule { public CreateRootRule0() { super(new SNodePointer("r:229ce18d-2bb0-4d5b-a7cd-cec65841e459(jetbrains.mps.lang.behavior.generator.template.main@generator)", "4881419546810727151")); } @Override public boolean isApplicable(@NotNull TemplateContext context) throws GenerationException { return QueriesGenerated.createRootRule_Condition_4881419546810727153(new CreateRootRuleContext(context, getRuleNode())); } public Collection<SNode> apply(TemplateExecutionEnvironment environment) throws GenerationException { Collection<SNode> result = new Template_BehaviorAspectDescriptor().apply(environment, new DefaultTemplateContext(environment, null, null)); return result; } } }