package jetbrains.mps.lang.editor.figures.typesystem;
/*Generated by MPS */
import jetbrains.mps.lang.typesystem.runtime.AbstractInferenceRule_Runtime;
import jetbrains.mps.lang.typesystem.runtime.InferenceRule_Runtime;
import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.typesystem.inference.TypeCheckingContext;
import jetbrains.mps.lang.typesystem.runtime.IsApplicableStatus;
import jetbrains.mps.lang.editor.figures.behavior.FigureParameter__BehaviorDescriptor;
import jetbrains.mps.typesystem.inference.EquationInfo;
import org.jetbrains.mps.openapi.language.SAbstractConcept;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
public class typeof_FigureParameter_InferenceRule extends AbstractInferenceRule_Runtime implements InferenceRule_Runtime {
public typeof_FigureParameter_InferenceRule() {
}
public void applyRule(final SNode figureParameter, final TypeCheckingContext typeCheckingContext, IsApplicableStatus status) {
SNode type = Utils.getFirstGenericParameterType(FigureParameter__BehaviorDescriptor.getParameterType_idiZqVFYvBew.invoke(figureParameter));
if (type != null) {
{
SNode _nodeToCheck_1029348928467 = figureParameter;
EquationInfo _info_12389875345 = new EquationInfo(_nodeToCheck_1029348928467, null, "r:e599f0dc-4c53-470d-be67-94ae885c5aab(jetbrains.mps.lang.editor.figures.typesystem)", "342110547581237064", 0, null);
typeCheckingContext.createEquation((SNode) typeCheckingContext.typeOf(_nodeToCheck_1029348928467, "r:e599f0dc-4c53-470d-be67-94ae885c5aab(jetbrains.mps.lang.editor.figures.typesystem)", "342110547581237066", true), (SNode) type, _info_12389875345);
}
}
}
public SAbstractConcept getApplicableConcept() {
return MetaAdapterFactory.getInterfaceConcept(0xd7722d504b934c3aL, 0xae061903d05f95a7L, 0x4bf6bbafe7e7155L, "jetbrains.mps.lang.editor.figures.structure.FigureParameter");
}
public IsApplicableStatus isApplicableAndPattern(SNode argument) {
return new IsApplicableStatus(argument.getConcept().isSubConceptOf(getApplicableConcept()), null);
}
public boolean overrides() {
return false;
}
}