package jetbrains.mps.samples.SwingBuilder.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.smodel.SNodePointer;
public class ElementReference_Constraints extends BaseConstraintsDescriptor {
public ElementReference_Constraints() {
super(MetaAdapterFactory.getConcept(0xb4dbff0c8c314a79L, 0xa45a98e5fd0530e7L, 0xd0f6999e83a1e8aL, "jetbrains.mps.samples.SwingBuilder.structure.ElementReference"));
}
@Override
protected Map<SReferenceLink, ReferenceConstraintsDescriptor> getSpecifiedReferences() {
Map<SReferenceLink, ReferenceConstraintsDescriptor> references = new HashMap<SReferenceLink, ReferenceConstraintsDescriptor>();
references.put(MetaAdapterFactory.getReferenceLink(0xb4dbff0c8c314a79L, 0xa45a98e5fd0530e7L, 0xd0f6999e83a1e8aL, 0xd0f6999e83a1e8bL, "element"), new BaseReferenceConstraintsDescriptor(MetaIdFactory.refId(0xb4dbff0c8c314a79L, 0xa45a98e5fd0530e7L, 0xd0f6999e83a1e8aL, 0xd0f6999e83a1e8bL), this) {
@Override
public boolean hasOwnScopeProvider() {
return true;
}
@Nullable
@Override
public ReferenceScopeProvider getScopeProvider() {
return new BaseScopeProvider() {
@Override
public SNodeReference getSearchScopeValidatorNode() {
return breakingNode_4bmjf7_a0a0a0a0a1a0b0a1a2;
}
@Override
public Scope createScope(final IOperationContext operationContext, final ReferenceConstraintsContext _context) {
return ListScope.forNamedElements(ListSequence.fromList(SModelOperations.roots(SNodeOperations.getModel(_context.getContextNode()), MetaAdapterFactory.getConcept(0xb4dbff0c8c314a79L, 0xa45a98e5fd0530e7L, 0xd0f6999e83a1c61L, "jetbrains.mps.samples.SwingBuilder.structure.Filter"))).union(ListSequence.fromList(SModelOperations.roots(SNodeOperations.getModel(_context.getContextNode()), MetaAdapterFactory.getConcept(0xb4dbff0c8c314a79L, 0xa45a98e5fd0530e7L, 0xd0f6999e83a1d95L, "jetbrains.mps.samples.SwingBuilder.structure.Map")))));
}
};
}
});
return references;
}
private static SNodePointer breakingNode_4bmjf7_a0a0a0a0a1a0b0a1a2 = new SNodePointer("r:7a1c88cb-66d9-4726-9b4a-d5dc6c544de7(jetbrains.mps.samples.SwingBuilder.constraints)", "6836281137582847989");
}