package jetbrains.mps.lang.dataFlow.analyzers.constraints; /*Generated by MPS */ import jetbrains.mps.smodel.runtime.base.BaseConstraintsDescriptor; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import java.util.Map; import org.jetbrains.mps.openapi.language.SReferenceLink; import jetbrains.mps.smodel.runtime.ReferenceConstraintsDescriptor; import java.util.HashMap; import jetbrains.mps.smodel.runtime.base.BaseReferenceConstraintsDescriptor; import jetbrains.mps.smodel.adapter.ids.MetaIdFactory; import org.jetbrains.annotations.Nullable; import jetbrains.mps.smodel.runtime.ReferenceScopeProvider; import jetbrains.mps.smodel.runtime.base.BaseScopeProvider; import org.jetbrains.mps.openapi.model.SNodeReference; import jetbrains.mps.scope.Scope; import jetbrains.mps.smodel.IOperationContext; import jetbrains.mps.smodel.runtime.ReferenceConstraintsContext; import java.util.List; import org.jetbrains.mps.openapi.model.SNode; import java.util.ArrayList; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; import jetbrains.mps.internal.collections.runtime.ListSequence; import jetbrains.mps.internal.collections.runtime.Sequence; import jetbrains.mps.scope.ListScope; import jetbrains.mps.smodel.SNodePointer; public class InstructionReference_Constraints extends BaseConstraintsDescriptor { public InstructionReference_Constraints() { super(MetaAdapterFactory.getConcept(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x3a887e9da0b4cedcL, "jetbrains.mps.lang.dataFlow.analyzers.structure.InstructionReference")); } @Override protected Map<SReferenceLink, ReferenceConstraintsDescriptor> getSpecifiedReferences() { Map<SReferenceLink, ReferenceConstraintsDescriptor> references = new HashMap<SReferenceLink, ReferenceConstraintsDescriptor>(); references.put(MetaAdapterFactory.getReferenceLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x3a887e9da0b4cedcL, 0x3a887e9da0b4cee5L, "instruction"), new BaseReferenceConstraintsDescriptor(MetaIdFactory.refId(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x3a887e9da0b4cedcL, 0x3a887e9da0b4cee5L), this) { @Override public boolean hasOwnScopeProvider() { return true; } @Nullable @Override public ReferenceScopeProvider getScopeProvider() { return new BaseScopeProvider() { @Override public SNodeReference getSearchScopeValidatorNode() { return breakingNode_yymroq_a0a0a0a0a1a0b0a1a2; } @Override public Scope createScope(final IOperationContext operationContext, final ReferenceConstraintsContext _context) { { List<SNode> result = new ArrayList<SNode>(); SNode analyzer = SLinkOperations.getTarget(SNodeOperations.getNodeAncestor(_context.getContextNode(), MetaAdapterFactory.getConcept(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5faaa6bbd57b6c8L, "jetbrains.mps.lang.dataFlow.analyzers.structure.Rule"), false, false), MetaAdapterFactory.getReferenceLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5faaa6bbd57b6c8L, 0x3952cf7bd76e6440L, "analyzer")); ListSequence.fromList(result).addSequence(ListSequence.fromList(SLinkOperations.getChildren(analyzer, MetaAdapterFactory.getContainmentLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x2e25b6b7919ac138L, "instruction"))).concat(Sequence.fromIterable(SLinkOperations.collectMany(SLinkOperations.collect(SLinkOperations.getChildren(analyzer, MetaAdapterFactory.getContainmentLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x5bd9e43c93f46789L, 0x73e1fea9c173f804L, "usedContainers")), MetaAdapterFactory.getReferenceLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x73e1fea9c1738798L, 0x73e1fea9c1738799L, "containter")), MetaAdapterFactory.getContainmentLink(0x97a52717898f4598L, 0x8150573d9fd03868L, 0x73e1fea9c172b8b1L, 0x73e1fea9c172d0e9L, "instruction"))))); return ListScope.forResolvableElements(result); } } }; } }); return references; } private static SNodePointer breakingNode_yymroq_a0a0a0a0a1a0b0a1a2 = new SNodePointer("r:73c9a355-2bf0-4466-8a7d-8b8d8a945cd4(jetbrains.mps.lang.dataFlow.analyzers.constraints)", "6836281137582779872"); }