package jetbrains.mps.lang.smodel.generator.baseLanguage.template.main; /*Generated by MPS */ import jetbrains.mps.generator.runtime.Generated; import jetbrains.mps.generator.runtime.TemplateSwitchBase; import jetbrains.mps.generator.runtime.TemplateSwitchMapping; import jetbrains.mps.generator.runtime.TemplateReductionRule; import jetbrains.mps.generator.runtime.TemplateUtil; import org.jetbrains.mps.openapi.model.SNodeReference; import jetbrains.mps.smodel.SNodePointer; import java.util.Collection; import org.jetbrains.mps.openapi.model.SNode; import jetbrains.mps.generator.runtime.TemplateExecutionEnvironment; import jetbrains.mps.generator.runtime.TemplateContext; import jetbrains.mps.generator.runtime.GenerationException; import jetbrains.mps.generator.impl.DismissTopMappingRuleException; import jetbrains.mps.generator.impl.GeneratorUtil; import jetbrains.mps.generator.runtime.ReductionRuleBase; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import org.jetbrains.annotations.NotNull; @Generated public class Switch_switch_AssociationIdentity_SReferenceLink extends TemplateSwitchBase implements TemplateSwitchMapping { private final Iterable<TemplateReductionRule> rules; public Switch_switch_AssociationIdentity_SReferenceLink() { rules = TemplateUtil.<TemplateReductionRule>asIterable(new Switch_switch_AssociationIdentity_SReferenceLink.ReductionRule0()); } public SNodeReference getSwitchNode() { return new SNodePointer("r:00000000-0000-4000-0000-011c89590303(jetbrains.mps.lang.smodel.generator.baseLanguage.template.main@generator)", "8415841354032416821"); } public SNodeReference getModifiesSwitch() { return null; } public Iterable<TemplateReductionRule> getReductionRules() { return rules; } public Collection<SNode> applyDefault(final TemplateExecutionEnvironment environment, SNodeReference templateSwitch, String mappingLabel, final TemplateContext context) throws GenerationException { DismissTopMappingRuleException ex_ldpfoe_a = new DismissTopMappingRuleException(DismissTopMappingRuleException.MessageType.error, "\"Unsupported ReferenceIdentity kind\""); ex_ldpfoe_a.setTemplateContext(context); ex_ldpfoe_a.setTemplateModelLocation(new SNodePointer("r:00000000-0000-4000-0000-011c89590303(jetbrains.mps.lang.smodel.generator.baseLanguage.template.main@generator)", "8415841354032416824")); throw ex_ldpfoe_a; } public void processNull(TemplateExecutionEnvironment environment, SNodeReference templateSwitch, TemplateContext context) { environment.getLogger().error(templateSwitch, "\"Need an instance of ReferenceIdentity\"", GeneratorUtil.describeInput(context)); } public final class ReductionRule0 extends ReductionRuleBase { public ReductionRule0() { super(new SNodePointer("r:00000000-0000-4000-0000-011c89590303(jetbrains.mps.lang.smodel.generator.baseLanguage.template.main@generator)", "8415841354032416822"), MetaAdapterFactory.getConcept(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x74cb131f5923b6ecL, "jetbrains.mps.lang.smodel.structure.ReferenceLinkId"), true); } @Override public Collection<SNode> apply(@NotNull final TemplateContext context) throws GenerationException { final TemplateExecutionEnvironment environment = context.getEnvironment(); Collection<SNode> tlist1 = new Template_reduce_ReferenceLinkId_SReferenceLink().apply(environment, context); return tlist1; } } }