package jetbrains.mps.execution.settings.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 org.jetbrains.mps.openapi.model.SNode; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; import jetbrains.mps.typesystem.inference.TypeChecker; import jetbrains.mps.lang.typesystem.runtime.HUtil; import jetbrains.mps.scope.ListScope; import jetbrains.mps.internal.collections.runtime.Sequence; import java.util.Collections; import jetbrains.mps.smodel.SNodePointer; public class PersistentPropertyReferenceOperation_Constraints extends BaseConstraintsDescriptor { public PersistentPropertyReferenceOperation_Constraints() { super(MetaAdapterFactory.getConcept(0x756e911c3f1f4a48L, 0xbdf5a2ceb91b723cL, 0xd244b712f91010eL, "jetbrains.mps.execution.settings.structure.PersistentPropertyReferenceOperation")); } @Override protected Map<SReferenceLink, ReferenceConstraintsDescriptor> getSpecifiedReferences() { Map<SReferenceLink, ReferenceConstraintsDescriptor> references = new HashMap<SReferenceLink, ReferenceConstraintsDescriptor>(); references.put(MetaAdapterFactory.getReferenceLink(0x756e911c3f1f4a48L, 0xbdf5a2ceb91b723cL, 0xd244b712f91010eL, 0xd244b712f91010fL, "variableDeclaration"), new BaseReferenceConstraintsDescriptor(MetaIdFactory.refId(0x756e911c3f1f4a48L, 0xbdf5a2ceb91b723cL, 0xd244b712f91010eL, 0xd244b712f91010fL), this) { @Override public boolean hasOwnScopeProvider() { return true; } @Nullable @Override public ReferenceScopeProvider getScopeProvider() { return new BaseScopeProvider() { @Override public SNodeReference getSearchScopeValidatorNode() { return breakingNode_yui4e7_a0a0a0a0a1a0b0a1a2; } @Override public Scope createScope(final IOperationContext operationContext, final ReferenceConstraintsContext _context) { { SNode instance = SLinkOperations.getTarget(SNodeOperations.cast((((_context.getReferenceNode() == null) ? _context.getContextNode() : SNodeOperations.getParent(_context.getReferenceNode()))), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, "jetbrains.mps.baseLanguage.structure.DotExpression")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46a4416L, "operand")); SNode propertyHolderType = TypeChecker.getInstance().getRuntimeSupport().coerce_(TypeChecker.getInstance().getTypeOf(instance), HUtil.createMatchingPatternByConcept(MetaAdapterFactory.getConcept(0x756e911c3f1f4a48L, 0xbdf5a2ceb91b723cL, 0xd244b712f91001cL, "jetbrains.mps.execution.settings.structure.PersistentConfigurationType")), false); if ((propertyHolderType == null) || (SLinkOperations.getTarget(propertyHolderType, MetaAdapterFactory.getReferenceLink(0x756e911c3f1f4a48L, 0xbdf5a2ceb91b723cL, 0xd244b712f91001cL, 0xd244b712f91001dL, "persistentConfiguration")) == null)) { return ListScope.forResolvableElements(Sequence.fromIterable(Collections.<SNode>emptyList())); } return ListScope.forResolvableElements(SLinkOperations.getChildren(SLinkOperations.getTarget(propertyHolderType, MetaAdapterFactory.getReferenceLink(0x756e911c3f1f4a48L, 0xbdf5a2ceb91b723cL, 0xd244b712f91001cL, 0xd244b712f91001dL, "persistentConfiguration")), MetaAdapterFactory.getContainmentLink(0x756e911c3f1f4a48L, 0xbdf5a2ceb91b723cL, 0xd244b712f910122L, 0xd244b712f910123L, "persistentProperty"))); } } }; } }); return references; } private static SNodePointer breakingNode_yui4e7_a0a0a0a0a1a0b0a1a2 = new SNodePointer("r:26cd452e-c5c2-4d47-ad13-dda4362e8616(jetbrains.mps.execution.settings.constraints)", "6836281137582823617"); }