package jetbrains.mps.lang.smodel.typesystem; /*Generated by MPS */ import jetbrains.mps.lang.typesystem.runtime.SubtypingRule_Runtime; import jetbrains.mps.lang.typesystem.runtime.ISubtypingRule_Runtime; import jetbrains.mps.lang.pattern.GeneratedMatchingPattern; import java.util.List; import org.jetbrains.mps.openapi.model.SNode; import jetbrains.mps.typesystem.inference.TypeCheckingContext; import jetbrains.mps.lang.typesystem.runtime.IsApplicableStatus; import jetbrains.mps.internal.collections.runtime.ListSequence; import java.util.ArrayList; import org.jetbrains.mps.openapi.language.SAbstractConcept; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import org.jetbrains.mps.openapi.persistence.PersistenceFacade; import jetbrains.mps.smodel.SModelUtil_new; import jetbrains.mps.smodel.SReference; public class supertypesOf_SNodeType_SConceptType_SubtypingRule extends SubtypingRule_Runtime implements ISubtypingRule_Runtime { /*package*/ GeneratedMatchingPattern myMatchingPattern; public supertypesOf_SNodeType_SConceptType_SubtypingRule() { } public List<SNode> getSubOrSuperTypes(SNode node, TypeCheckingContext typeCheckingContext, IsApplicableStatus status) { List<SNode> result = ListSequence.fromList(new ArrayList<SNode>(2)); ListSequence.fromList(result).addElement(_quotation_createNode_6gcjzy_a0a1a2()); ListSequence.fromList(result).addElement(_quotation_createNode_6gcjzy_a0a2a2()); return result; } public SAbstractConcept getApplicableConcept() { return MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, "jetbrains.mps.lang.smodel"), 0x108f968b3caL, "SNodeType"); } public IsApplicableStatus isApplicableAndPattern(SNode argument) { { GeneratedMatchingPattern pattern = new Pattern_f2ap4ae4(_quotation_createNode_6gcjzy_a0a0a0a0e()); this.myMatchingPattern = pattern; boolean b = pattern.match(argument); return new IsApplicableStatus(b, pattern); } } public boolean isWeak() { return true; } private static SNode _quotation_createNode_6gcjzy_a0a1a2() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, "jetbrains.mps.lang.smodel"), 0x110f9b63680L, "ConceptNodeType"), null, null, false); quotedNode_1.setReference(MetaAdapterFactory.getReferenceLink(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x110f9b63680L, 0x112da284156L, "conceptDeclaraton"), SReference.create(MetaAdapterFactory.getReferenceLink(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x110f9b63680L, 0x112da284156L, "conceptDeclaraton"), quotedNode_1, facade.createModelReference("r:00000000-0000-4000-0000-011c89590288(jetbrains.mps.lang.core.structure)"), facade.createNodeId("1133920641626"))); return quotedNode_1; } private static SNode _quotation_createNode_6gcjzy_a0a2a2() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, "jetbrains.mps.lang.smodel"), 0x110f9b63680L, "ConceptNodeType"), null, null, false); return quotedNode_1; } private static SNode _quotation_createNode_6gcjzy_a0a0a0a0e() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, "jetbrains.mps.lang.smodel"), 0x108f968b3caL, "SNodeType"), null, null, false); quotedNode_1.setReference(MetaAdapterFactory.getReferenceLink(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x108f968b3caL, 0x1090e46ca51L, "concept"), SReference.create(MetaAdapterFactory.getReferenceLink(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x108f968b3caL, 0x1090e46ca51L, "concept"), quotedNode_1, facade.createModelReference("r:00000000-0000-4000-0000-011c89590292(jetbrains.mps.lang.structure.structure)"), facade.createNodeId("1169125787135"))); return quotedNode_1; } }