package jetbrains.mps.baseLanguage.closures.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 jetbrains.mps.scope.ListScope; import jetbrains.mps.internal.collections.runtime.ListSequence; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SModelOperations; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; import jetbrains.mps.internal.collections.runtime.IWhereFilter; import org.jetbrains.mps.openapi.model.SNode; import jetbrains.mps.internal.collections.runtime.Sequence; import jetbrains.mps.baseLanguage.behavior.Classifier__BehaviorDescriptor; import jetbrains.mps.smodel.SNodePointer; public class FunctionType_Constraints extends BaseConstraintsDescriptor { public FunctionType_Constraints() { super(MetaAdapterFactory.getConcept(0xfd3920347849419dL, 0x907112563d152375L, 0x1174a4d19ffL, "jetbrains.mps.baseLanguage.closures.structure.FunctionType")); } @Override protected Map<SReferenceLink, ReferenceConstraintsDescriptor> getSpecifiedReferences() { Map<SReferenceLink, ReferenceConstraintsDescriptor> references = new HashMap<SReferenceLink, ReferenceConstraintsDescriptor>(); references.put(MetaAdapterFactory.getReferenceLink(0xfd3920347849419dL, 0x907112563d152375L, 0x1174a4d19ffL, 0x16630bea72d45e9L, "runtimeIface"), new BaseReferenceConstraintsDescriptor(MetaIdFactory.refId(0xfd3920347849419dL, 0x907112563d152375L, 0x1174a4d19ffL, 0x16630bea72d45e9L), this) { @Override public boolean hasOwnScopeProvider() { return true; } @Nullable @Override public ReferenceScopeProvider getScopeProvider() { return new BaseScopeProvider() { @Override public SNodeReference getSearchScopeValidatorNode() { return breakingNode_yerj9w_a0a0a0a0a1a0b0a1a2; } @Override public Scope createScope(final IOperationContext operationContext, final ReferenceConstraintsContext _context) { return ListScope.forResolvableElements(ListSequence.fromList(SModelOperations.nodesIncludingImported(SNodeOperations.getModel(_context.getContextNode()), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101edd46144L, "jetbrains.mps.baseLanguage.structure.Interface"))).where(new IWhereFilter<SNode>() { public boolean accept(SNode ifc) { return Sequence.fromIterable(Classifier__BehaviorDescriptor.methods_id4_LVZ3pBKCn.invoke(ifc)).count() == 1; } })); } }; } }); return references; } private static SNodePointer breakingNode_yerj9w_a0a0a0a0a1a0b0a1a2 = new SNodePointer("r:00000000-0000-4000-0000-011c89590334(jetbrains.mps.baseLanguage.closures.constraints)", "6836281137582646909"); }