package jetbrains.mps.lang.intentions.generator.baseLanguage.template.main;
/*Generated by MPS */
import jetbrains.mps.generator.runtime.Generated;
import jetbrains.mps.generator.impl.query.QueryProviderBase;
import jetbrains.mps.generator.template.CreateRootRuleContext;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SModuleOperations;
import jetbrains.mps.generator.template.BaseMappingRuleContext;
import org.jetbrains.mps.openapi.model.SModel;
import jetbrains.mps.generator.template.PropertyMacroContext;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import jetbrains.mps.internal.collections.runtime.Sequence;
import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.internal.collections.runtime.ListSequence;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SModelOperations;
import org.jetbrains.mps.openapi.module.SModule;
import jetbrains.mps.smodel.Language;
import jetbrains.mps.intentions.IntentionsManager;
import jetbrains.mps.lang.intentions.behavior.BaseIntentionDeclaration__BehaviorDescriptor;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import jetbrains.mps.generator.template.ReferenceMacroContext;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;
import jetbrains.mps.generator.template.IfMacroContext;
import jetbrains.mps.lang.intentions.util.TypeCalculator;
import jetbrains.mps.generator.template.SourceSubstituteMacroNodeContext;
import jetbrains.mps.baseLanguage.lightweightdsl.behavior.DSLClassMember__BehaviorDescriptor;
import jetbrains.mps.generator.template.SourceSubstituteMacroNodesContext;
import java.util.List;
import jetbrains.mps.baseLanguage.behavior.Classifier__BehaviorDescriptor;
import jetbrains.mps.internal.collections.runtime.IWhereFilter;
import jetbrains.mps.generator.template.TemplateVarContext;
import jetbrains.mps.internal.collections.runtime.ISelector;
import jetbrains.mps.smodel.adapter.ids.MetaIdByDeclaration;
import java.util.Map;
import jetbrains.mps.generator.impl.query.ReductionRuleCondition;
import java.util.HashMap;
import org.jetbrains.annotations.NotNull;
import jetbrains.mps.generator.impl.query.QueryKey;
import jetbrains.mps.generator.template.ReductionRuleQueryContext;
import jetbrains.mps.generator.impl.GenerationFailureException;
import jetbrains.mps.generator.impl.query.CreateRootCondition;
import jetbrains.mps.generator.impl.query.SourceNodeQuery;
import jetbrains.mps.generator.impl.query.QueryKeyImpl;
import org.jetbrains.annotations.Nullable;
import jetbrains.mps.generator.impl.query.SourceNodesQuery;
import java.util.Collection;
import jetbrains.mps.util.IterableUtil;
import jetbrains.mps.generator.impl.query.PropertyValueQuery;
import org.jetbrains.mps.openapi.language.SProperty;
import jetbrains.mps.generator.impl.query.IfMacroCondition;
import jetbrains.mps.generator.impl.query.ReferenceTargetQuery;
import jetbrains.mps.generator.impl.query.VariableValueQuery;
@Generated
public class QueriesGenerated extends QueryProviderBase {
public QueriesGenerated() {
super(1);
}
public static boolean createRootRule_Condition_3914914270862159528(final CreateRootRuleContext _context) {
// see MPS-24613
return SModuleOperations.isAspect(_context.getOriginalInputModel(), "intentions");
}
public static boolean baseMappingRule_Condition_1570228009929814973(final BaseMappingRuleContext _context) {
// see MPS-24613
return SModuleOperations.isAspect(((SModel) _context.getVariable("model")), "intentions");
}
public static Object propertyMacro_GetPropertyValue_1889794043260133526(final PropertyMacroContext _context) {
return SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"));
}
public static Object propertyMacro_GetPropertyValue_1889794043260246447(final PropertyMacroContext _context) {
return Sequence.fromIterable(((Iterable<SNode>) _context.getVariable("var:i1"))).count() + Sequence.fromIterable(((Iterable<SNode>) _context.getVariable("var:i2"))).count();
}
public static Object propertyMacro_GetPropertyValue_1889794043260295756(final PropertyMacroContext _context) {
return ((Integer) _context.getVariable("cv:i"));
}
public static Object propertyMacro_GetPropertyValue_1889794043260300864(final PropertyMacroContext _context) {
return ((Integer) _context.getVariable("cv:i")) + Sequence.fromIterable(((Iterable<SNode>) _context.getVariable("var:i1"))).count();
}
public static Object propertyMacro_GetPropertyValue_5378595502815609483(final PropertyMacroContext _context) {
return ListSequence.fromList(SModelOperations.roots(_context.getInputModel(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x2303633a9c3cc675L, "jetbrains.mps.lang.intentions.structure.BaseIntentionDeclaration"))).count() + ListSequence.fromList(SModelOperations.roots(_context.getInputModel(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x71ffad1474b12a0bL, "jetbrains.mps.lang.intentions.structure.Intention"))).count();
}
public static Object propertyMacro_GetPropertyValue_5378595502815589441(final PropertyMacroContext _context) {
return ((Integer) _context.getVariable("cv:k"));
}
public static Object propertyMacro_GetPropertyValue_9012921169005027901(final PropertyMacroContext _context) {
return ((Integer) _context.getVariable("cv:k")) + ListSequence.fromList(SModelOperations.roots(_context.getInputModel(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x2303633a9c3cc675L, "jetbrains.mps.lang.intentions.structure.BaseIntentionDeclaration"))).count();
}
public static Object propertyMacro_GetPropertyValue_7991477654791693985(final PropertyMacroContext _context) {
SModule module = _context.getOriginalInputModel().getModule();
assert module instanceof Language;
return IntentionsManager.getDescriptorClassName(module.getModuleReference());
}
public static Object propertyMacro_GetPropertyValue_647666612127743999(final PropertyMacroContext _context) {
return (String) BaseIntentionDeclaration__BehaviorDescriptor.getGeneratedName_id5rGvd38DcHL.invoke(_context.getNode());
}
public static Object propertyMacro_GetPropertyValue_3927053800880514588(final PropertyMacroContext _context) {
return SPropertyOperations.getBoolean(_context.getNode(), MetaAdapterFactory.getProperty(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x2303633a9c3cc675L, 0x2303633a9c3cc67aL, "isAvailableInChildNodes"));
}
public static Object propertyMacro_GetPropertyValue_3927053800880514598(final PropertyMacroContext _context) {
SNode original = _context.getOriginalCopiedInputNode(_context.getNode());
return SNodeOperations.getModel(original).getReference().toString();
}
public static Object propertyMacro_GetPropertyValue_3927053800880514618(final PropertyMacroContext _context) {
SNode original = _context.getOriginalCopiedInputNode(_context.getNode());
return original.getNodeId().toString();
}
public static Object propertyMacro_GetPropertyValue_2230972008179703478(final PropertyMacroContext _context) {
return SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"));
}
public static Object propertyMacro_GetPropertyValue_286293695940675180(final PropertyMacroContext _context) {
return SNodeOperations.isInstanceOf(_context.getNode(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x2303633a9c3e6815L, "jetbrains.mps.lang.intentions.structure.SurroundWithIntentionDeclaration"));
}
public static Object propertyMacro_GetPropertyValue_5476379430792994477(final PropertyMacroContext _context) {
return SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"));
}
public static Object propertyMacro_GetPropertyValue_7506079045411260813(final PropertyMacroContext _context) {
SNode original = _context.getOriginalCopiedInputNode(_context.getNode());
return SNodeOperations.getModel(original).getReference().toString();
}
public static Object propertyMacro_GetPropertyValue_7506079045411272171(final PropertyMacroContext _context) {
SNode original = _context.getOriginalCopiedInputNode(_context.getNode());
return original.getNodeId().toString();
}
public static Object referenceMacro_GetReferent_5264392666049409975(final ReferenceMacroContext _context) {
return "myParameter";
}
public static Object referenceMacro_GetReferent_1188842953199099126(final ReferenceMacroContext _context) {
return "myParameter";
}
public static Object referenceMacro_GetReferent_1889794043260293448(final ReferenceMacroContext _context) {
return _context.getOutputNodeByInputNodeAndMappingLabel(_context.getNode(), "map_IntentionFactoryConstructor");
}
public static Object referenceMacro_GetReferent_1889794043260329903(final ReferenceMacroContext _context) {
return _context.getOutputNodeByInputNodeAndMappingLabel(_context.getNode(), "map_newIntentionFactoryConstructor");
}
public static Object referenceMacro_GetReferent_6551427688186219815(final ReferenceMacroContext _context) {
return _context.getNode();
}
public static Object referenceMacro_GetReferent_5378595502815589451(final ReferenceMacroContext _context) {
return _context.getOutputNodeByInputNodeAndMappingLabel(_context.getNode(), "map_IntentionFactoryConstructor");
}
public static Object referenceMacro_GetReferent_1738609523201655646(final ReferenceMacroContext _context) {
return _context.getOutputNodeByInputNodeAndMappingLabel(_context.getNode(), "map_newIntentionFactoryConstructor");
}
public static Object referenceMacro_GetReferent_2230972008180633738(final ReferenceMacroContext _context) {
return _context.getOutputNodeByInputNodeAndMappingLabel(_context.getNode(), "map_IntentionConstructor");
}
public static Object referenceMacro_GetReferent_1145475927579234607(final ReferenceMacroContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x2303633a9c3cc675L, 0x2303633a9c3e6812L, "forConcept"));
}
public static Object referenceMacro_GetReferent_2230972008180658534(final ReferenceMacroContext _context) {
return _context.getOutputNodeByInputNodeAndMappingLabel(_context.getNode(), "map_IntentionConstructor");
}
public static Object referenceMacro_GetReferent_581316143750725400(final ReferenceMacroContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x71ffad1474b12a0bL, 0x10d005a50b96761L, "forConcept"));
}
public static Object referenceMacro_GetReferent_7311909354344303052(final ReferenceMacroContext _context) {
return _context.getOutputNodeByInputNodeAndMappingLabel(_context.getNode(), "map_isApplicable_helper");
}
public static Object referenceMacro_GetReferent_4147950839246952264(final ReferenceMacroContext _context) {
// TODO genContext.get output IntentionsDescriptorCons for model model;
return SModelOperations.getModelName(((SModel) _context.getVariable("model"))) + ".IntentionsDescriptor";
}
public static boolean ifMacro_Condition_2230972008180147293(final IfMacroContext _context) {
return !(SNodeOperations.isInstanceOf(_context.getNode(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x120cd519c2dL, "jetbrains.mps.lang.intentions.structure.ParameterizedIntentionDeclaration")));
}
public static boolean ifMacro_Condition_6960679590829154139(final IfMacroContext _context) {
return SPropertyOperations.getBoolean(_context.getNode(), MetaAdapterFactory.getProperty(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x2303633a9c3cc675L, 0x2303633a9c3cc679L, "isErrorIntention"));
}
public static boolean ifMacro_Condition_3641631367668343949(final IfMacroContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x2303633a9c3cc675L, 0x2303633a9c3cd0abL, "isApplicableFunction")) != null;
}
public static boolean ifMacro_Condition_3641631367668343975(final IfMacroContext _context) {
return SPropertyOperations.getBoolean(_context.getNode(), MetaAdapterFactory.getProperty(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x2303633a9c3cc675L, 0x2303633a9c3cc67aL, "isAvailableInChildNodes")) && (SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x2303633a9c3cc675L, 0x2303633a9c3cd0aaL, "childFilterFunction")) != null);
}
public static boolean ifMacro_Condition_6718223406753528001(final IfMacroContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x2303633a9c3cc675L, 0x2303633a9c3cd0abL, "isApplicableFunction")) != null;
}
public static boolean ifMacro_Condition_6718223406753528027(final IfMacroContext _context) {
return SPropertyOperations.getBoolean(_context.getNode(), MetaAdapterFactory.getProperty(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x2303633a9c3cc675L, 0x2303633a9c3cc67aL, "isAvailableInChildNodes")) && (SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x2303633a9c3cc675L, 0x2303633a9c3cd0aaL, "childFilterFunction")) != null);
}
public static boolean ifMacro_Condition_8879227374728208773(final IfMacroContext _context) {
return SNodeOperations.isInstanceOf(_context.getNode(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x120cd519c2dL, "jetbrains.mps.lang.intentions.structure.ParameterizedIntentionDeclaration"));
}
public static boolean ifMacro_Condition_2230972008180463823(final IfMacroContext _context) {
return SNodeOperations.isInstanceOf(_context.getNode(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x120cd519c2dL, "jetbrains.mps.lang.intentions.structure.ParameterizedIntentionDeclaration"));
}
public static boolean ifMacro_Condition_2230972008180498307(final IfMacroContext _context) {
return SNodeOperations.isInstanceOf(_context.getNode(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x120cd519c2dL, "jetbrains.mps.lang.intentions.structure.ParameterizedIntentionDeclaration"));
}
public static boolean ifMacro_Condition_2230972008180722563(final IfMacroContext _context) {
return SNodeOperations.isInstanceOf(_context.getNode(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x120cd519c2dL, "jetbrains.mps.lang.intentions.structure.ParameterizedIntentionDeclaration"));
}
public static boolean ifMacro_Condition_8879227374728238185(final IfMacroContext _context) {
return SNodeOperations.isInstanceOf(_context.getNode(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x120cd519c2dL, "jetbrains.mps.lang.intentions.structure.ParameterizedIntentionDeclaration"));
}
public static boolean ifMacro_Condition_7506079045411026961(final IfMacroContext _context) {
return ((Boolean) _context.getVariable("var:isError"));
}
public static boolean ifMacro_Condition_8036891771125785355(final IfMacroContext _context) {
return (((SNode) _context.getVariable("var:isApplicable")) == null);
}
public static boolean ifMacro_Condition_7271443492838287058(final IfMacroContext _context) {
return (((SNode) _context.getVariable("var:isApplicableInChild")) == null);
}
public static boolean ifMacro_Condition_1555068470914134308(final IfMacroContext _context) {
return TypeCalculator.isParametrized(_context.getNode());
}
public static boolean ifMacro_Condition_6295456526792107240(final IfMacroContext _context) {
return TypeCalculator.isParametrized(_context.getNode());
}
public static SNode sourceNodeQuery_5264392666049483255(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x108bbca0f48L, 0x108bbd29b4aL, "body"));
}
public static SNode sourceNodeQuery_6718223406753527992(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x2303633a9c3cc675L, 0x2303633a9c3cd0abL, "isApplicableFunction")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x108bbca0f48L, 0x108bbd29b4aL, "body"));
}
public static SNode sourceNodeQuery_6718223406753528020(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x2303633a9c3cc675L, 0x2303633a9c3cd0aaL, "childFilterFunction"));
}
public static SNode sourceNodeQuery_647666612128187508(final SourceSubstituteMacroNodeContext _context) {
return SNodeOperations.copyNode(SLinkOperations.getTarget(SLinkOperations.getTarget(SNodeOperations.cast(_context.getNode(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x120cd519c2dL, "jetbrains.mps.lang.intentions.structure.ParameterizedIntentionDeclaration")), MetaAdapterFactory.getContainmentLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x120cd519c2dL, 0x120cd55c89bL, "queryBlock")), MetaAdapterFactory.getContainmentLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x120c89cc719L, 0x120cd3676eeL, "paramType")));
}
public static SNode sourceNodeQuery_647666612128193000(final SourceSubstituteMacroNodeContext _context) {
return SNodeOperations.copyNode(SLinkOperations.getTarget(SLinkOperations.getTarget(SNodeOperations.cast(_context.getNode(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x120cd519c2dL, "jetbrains.mps.lang.intentions.structure.ParameterizedIntentionDeclaration")), MetaAdapterFactory.getContainmentLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x120cd519c2dL, 0x120cd55c89bL, "queryBlock")), MetaAdapterFactory.getContainmentLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x120c89cc719L, 0x120cd3676eeL, "paramType")));
}
public static SNode sourceNodeQuery_2230972008180540589(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x2303633a9c3cc675L, 0x2303633a9c3cd0a9L, "descriptionFunction")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x108bbca0f48L, 0x108bbd29b4aL, "body"));
}
public static SNode sourceNodeQuery_6718223406753537895(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x2303633a9c3cc675L, 0x2303633a9c3e6813L, "executeFunction")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x108bbca0f48L, 0x108bbd29b4aL, "body"));
}
public static SNode sourceNodeQuery_2230972008180086146(final SourceSubstituteMacroNodeContext _context) {
return SNodeOperations.copyNode(SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x120cd519c2dL, 0x120cd55c89bL, "queryBlock")), MetaAdapterFactory.getContainmentLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x120c89cc719L, 0x120cd3676eeL, "paramType")));
}
public static SNode sourceNodeQuery_2230972008180086170(final SourceSubstituteMacroNodeContext _context) {
return SNodeOperations.copyNode(SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x120cd519c2dL, 0x120cd55c89bL, "queryBlock")), MetaAdapterFactory.getContainmentLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x120c89cc719L, 0x120cd3676eeL, "paramType")));
}
public static SNode sourceNodeQuery_2230972008180086195(final SourceSubstituteMacroNodeContext _context) {
return SNodeOperations.copyNode(SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x120cd519c2dL, 0x120cd55c89bL, "queryBlock")), MetaAdapterFactory.getContainmentLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x120c89cc719L, 0x120cd3676eeL, "paramType")));
}
public static SNode sourceNodeQuery_581316143751323365(final SourceSubstituteMacroNodeContext _context) {
return SLinkOperations.getTarget(SNodeOperations.cast(Sequence.fromIterable(DSLClassMember__BehaviorDescriptor.find_id2gzehMfi1$l.invoke(SNodeOperations.getNode("r:d3905048-7598-4a84-931a-cbbcbcda146d(jetbrains.mps.lang.intentions.methods)", "2697606110805685905"), SNodeOperations.getNodeAncestor(_context.getNode(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x71ffad1474b12a0bL, "jetbrains.mps.lang.intentions.structure.Intention"), true, false))).first(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x6688b42d39674b7aL, "jetbrains.mps.lang.intentions.structure.Parameter")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0xf8cc56b1ffL, "body"));
}
public static SNode sourceNodeQuery_3121623838464340144(final SourceSubstituteMacroNodeContext _context) {
return TypeCalculator.parameterType(_context.getNode());
}
public static SNode sourceNodeQuery_5337495886742237353(final SourceSubstituteMacroNodeContext _context) {
return TypeCalculator.parameterType(_context.getNode());
}
public static Iterable<SNode> sourceNodesQuery_1889794043260277244(final SourceSubstituteMacroNodesContext _context) {
return ((Iterable<SNode>) _context.getVariable("var:i1"));
}
public static Iterable<SNode> sourceNodesQuery_1889794043260300882(final SourceSubstituteMacroNodesContext _context) {
return ((Iterable<SNode>) _context.getVariable("var:i2"));
}
public static Iterable<SNode> sourceNodesQuery_1889794043260130041(final SourceSubstituteMacroNodesContext _context) {
return ((List<SNode>) _context.getVariable("var:sortedConcepts"));
}
public static Iterable<SNode> sourceNodesQuery_5378595502815589459(final SourceSubstituteMacroNodesContext _context) {
return SModelOperations.roots(_context.getInputModel(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x2303633a9c3cc675L, "jetbrains.mps.lang.intentions.structure.BaseIntentionDeclaration"));
}
public static Iterable<SNode> sourceNodesQuery_9012921169005027919(final SourceSubstituteMacroNodesContext _context) {
return SModelOperations.roots(_context.getInputModel(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x71ffad1474b12a0bL, "jetbrains.mps.lang.intentions.structure.Intention"));
}
public static Iterable<SNode> sourceNodesQuery_2230972008180086208(final SourceSubstituteMacroNodesContext _context) {
return SLinkOperations.getChildren(SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x120cd519c2dL, 0x120cd55c89bL, "queryBlock")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x108bbca0f48L, 0x108bbd29b4aL, "body")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b200L, 0xf8cc6bf961L, "statement"));
}
public static Iterable<SNode> sourceNodesQuery_8036891771125815805(final SourceSubstituteMacroNodesContext _context) {
return SLinkOperations.getChildren(SLinkOperations.getTarget(((SNode) _context.getVariable("var:isApplicable")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0xf8cc56b1ffL, "body")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b200L, 0xf8cc6bf961L, "statement"));
}
public static Iterable<SNode> sourceNodesQuery_7271443492838287069(final SourceSubstituteMacroNodesContext _context) {
return SLinkOperations.getChildren(SLinkOperations.getTarget(((SNode) _context.getVariable("var:isApplicableInChild")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0xf8cc56b1ffL, "body")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b200L, 0xf8cc6bf961L, "statement"));
}
public static Iterable<SNode> sourceNodesQuery_1085351927652268869(final SourceSubstituteMacroNodesContext _context) {
Iterable<SNode> parameterMethod = null;
if (TypeCalculator.isParametrized(_context.getNode())) {
parameterMethod = DSLClassMember__BehaviorDescriptor.find_id2gzehMfi1$l.invoke(SNodeOperations.getNode("r:d3905048-7598-4a84-931a-cbbcbcda146d(jetbrains.mps.lang.intentions.methods)", "2697606110805685905"), SNodeOperations.getNodeAncestor(_context.getNode(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x71ffad1474b12a0bL, "jetbrains.mps.lang.intentions.structure.Intention"), true, false));
}
return Sequence.fromIterable(Classifier__BehaviorDescriptor.members_id1hodSy8nQmC.invoke(_context.getNode())).where(new IWhereFilter<SNode>() {
public boolean accept(SNode it) {
return SNodeOperations.isInstanceOf(it, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b21dL, "jetbrains.mps.baseLanguage.structure.InstanceMethodDeclaration")) && !((SNodeOperations.isInstanceOf(it, MetaAdapterFactory.getConcept(0xc7d5b9dda05f4be2L, 0xbc73f2e16994cc67L, 0x340eb2bd2e03d154L, "jetbrains.mps.baseLanguage.lightweightdsl.structure.MethodInstance"))));
}
}).union(Sequence.fromIterable(DSLClassMember__BehaviorDescriptor.find_id2gzehMfi1$l.invoke(SNodeOperations.getNode("r:d3905048-7598-4a84-931a-cbbcbcda146d(jetbrains.mps.lang.intentions.methods)", "7538218632063981347"), SNodeOperations.getNodeAncestor(_context.getNode(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x71ffad1474b12a0bL, "jetbrains.mps.lang.intentions.structure.Intention"), true, false)))).union(Sequence.fromIterable(DSLClassMember__BehaviorDescriptor.find_id2gzehMfi1$l.invoke(SNodeOperations.getNode("r:d3905048-7598-4a84-931a-cbbcbcda146d(jetbrains.mps.lang.intentions.methods)", "7538218632063982514"), SNodeOperations.getNodeAncestor(_context.getNode(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x71ffad1474b12a0bL, "jetbrains.mps.lang.intentions.structure.Intention"), true, false)))).subtract(Sequence.fromIterable(parameterMethod));
}
public static Object insertMacro_varValue_1889794043260126824(final TemplateVarContext _context) {
return ListSequence.fromList(SModelOperations.roots(_context.getInputModel(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x2303633a9c3cc675L, "jetbrains.mps.lang.intentions.structure.BaseIntentionDeclaration"))).where(new IWhereFilter<SNode>() {
public boolean accept(SNode it) {
return SLinkOperations.getTarget(it, MetaAdapterFactory.getReferenceLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x2303633a9c3cc675L, 0x2303633a9c3e6812L, "forConcept")) == _context.getNode();
}
});
}
public static Object insertMacro_varValue_1889794043260126787(final TemplateVarContext _context) {
return ListSequence.fromList(SModelOperations.roots(_context.getInputModel(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x71ffad1474b12a0bL, "jetbrains.mps.lang.intentions.structure.Intention"))).where(new IWhereFilter<SNode>() {
public boolean accept(SNode it) {
return SLinkOperations.getTarget(it, MetaAdapterFactory.getReferenceLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x71ffad1474b12a0bL, 0x10d005a50b96761L, "forConcept")) == _context.getNode();
}
});
}
public static Object insertMacro_varValue_32126802637421739(final TemplateVarContext _context) {
Iterable<SNode> baseIntentionConcepts = SLinkOperations.collect(SModelOperations.roots(_context.getInputModel(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x2303633a9c3cc675L, "jetbrains.mps.lang.intentions.structure.BaseIntentionDeclaration")), MetaAdapterFactory.getReferenceLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x2303633a9c3cc675L, 0x2303633a9c3e6812L, "forConcept"));
Iterable<SNode> classlikeIntentionConcepts = SLinkOperations.collect(SModelOperations.roots(_context.getInputModel(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x71ffad1474b12a0bL, "jetbrains.mps.lang.intentions.structure.Intention")), MetaAdapterFactory.getReferenceLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x71ffad1474b12a0bL, 0x10d005a50b96761L, "forConcept"));
Iterable<SNode> forConcept = Sequence.fromIterable(baseIntentionConcepts).union(Sequence.fromIterable(classlikeIntentionConcepts)).distinct();
return Sequence.fromIterable(forConcept).sort(new ISelector<SNode, Long>() {
public Long select(SNode it) {
return MetaIdByDeclaration.getConceptId(it).getIdValue();
}
}, true).toListSequence();
}
public static Object insertMacro_varValue_7506079045410944020(final TemplateVarContext _context) {
return SNodeOperations.isInstanceOf(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x71ffad1474b12a0bL, 0x59427edd75744671L, "priority")), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x59427edd75744615L, "jetbrains.mps.lang.intentions.structure.ErrorIntentionPriority"));
}
public static Object insertMacro_varValue_8036891771125728385(final TemplateVarContext _context) {
return SNodeOperations.cast(Sequence.fromIterable(DSLClassMember__BehaviorDescriptor.find_id2gzehMfi1$l.invoke(SNodeOperations.getNode("r:d3905048-7598-4a84-931a-cbbcbcda146d(jetbrains.mps.lang.intentions.methods)", "7538218632063982606"), SNodeOperations.getNodeAncestor(_context.getNode(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x71ffad1474b12a0bL, "jetbrains.mps.lang.intentions.structure.Intention"), true, false))).first(), MetaAdapterFactory.getConcept(0xc7d5b9dda05f4be2L, 0xbc73f2e16994cc67L, 0x340eb2bd2e03d154L, "jetbrains.mps.baseLanguage.lightweightdsl.structure.MethodInstance"));
}
public static Object insertMacro_varValue_7271443492838287040(final TemplateVarContext _context) {
return SNodeOperations.cast(Sequence.fromIterable(DSLClassMember__BehaviorDescriptor.find_id2gzehMfi1$l.invoke(SNodeOperations.getNode("r:d3905048-7598-4a84-931a-cbbcbcda146d(jetbrains.mps.lang.intentions.methods)", "7271443492837194032"), SNodeOperations.getNodeAncestor(_context.getNode(), MetaAdapterFactory.getConcept(0xd7a92d38f7db40d0L, 0x8431763b0c3c9f20L, 0x71ffad1474b12a0bL, "jetbrains.mps.lang.intentions.structure.Intention"), true, false))).first(), MetaAdapterFactory.getConcept(0xc7d5b9dda05f4be2L, 0xbc73f2e16994cc67L, 0x340eb2bd2e03d154L, "jetbrains.mps.baseLanguage.lightweightdsl.structure.MethodInstance"));
}
private final Map<String, ReductionRuleCondition> rrcMethods = new HashMap<String, ReductionRuleCondition>();
{
int i = 0;
rrcMethods.put("1570228009929814969", new QueriesGenerated.RRC(i++));
}
@Override
@NotNull
public ReductionRuleCondition getReductionRuleCondition(@NotNull QueryKey identity) {
final String id = identity.getTemplateNode().getNodeId().toString();
if (!(rrcMethods.containsKey(id))) {
return super.getReductionRuleCondition(identity);
}
return rrcMethods.get(id);
}
private static class RRC implements ReductionRuleCondition {
private final int methodKey;
public RRC(int methodKey) {
this.methodKey = methodKey;
}
@Override
public boolean check(ReductionRuleQueryContext ctx) throws GenerationFailureException {
switch (methodKey) {
case 0:
return QueriesGenerated.baseMappingRule_Condition_1570228009929814973(ctx);
default:
throw new GenerationFailureException(String.format("Inconsistent QueriesGenerated: there's no condition method for rule %s (key: #%d)", ctx.getTemplateReference(), methodKey));
}
}
}
private final Map<String, CreateRootCondition> crcMethods = new HashMap<String, CreateRootCondition>();
{
int i = 0;
crcMethods.put("3804167831988450889", new QueriesGenerated.CRC(i++));
}
@Override
@NotNull
public CreateRootCondition getCreateRootRuleCondition(@NotNull QueryKey identity) {
String id = identity.getTemplateNode().getNodeId().toString();
if (!(crcMethods.containsKey(id))) {
return super.getCreateRootRuleCondition(identity);
}
return crcMethods.get(id);
}
private static class CRC implements CreateRootCondition {
private final int methodKey;
public CRC(int methodKey) {
this.methodKey = methodKey;
}
@Override
public boolean check(@NotNull CreateRootRuleContext ctx) throws GenerationFailureException {
switch (methodKey) {
case 0:
return QueriesGenerated.createRootRule_Condition_3914914270862159528(ctx);
default:
throw new GenerationFailureException(String.format("Inconsistent QueriesGenerated: there's no condition method for rule %s (key: #%d)", ctx.getTemplateReference(), methodKey));
}
}
}
private final Map<String, SourceNodeQuery> snqMethods = new HashMap<String, SourceNodeQuery>();
{
int i = 0;
snqMethods.put("5264392666049483255", new QueriesGenerated.SNQ(i++));
snqMethods.put("6718223406753527992", new QueriesGenerated.SNQ(i++));
snqMethods.put("6718223406753528020", new QueriesGenerated.SNQ(i++));
snqMethods.put("647666612128187508", new QueriesGenerated.SNQ(i++));
snqMethods.put("647666612128193000", new QueriesGenerated.SNQ(i++));
snqMethods.put("2230972008180540589", new QueriesGenerated.SNQ(i++));
snqMethods.put("6718223406753537895", new QueriesGenerated.SNQ(i++));
snqMethods.put("2230972008180086146", new QueriesGenerated.SNQ(i++));
snqMethods.put("2230972008180086170", new QueriesGenerated.SNQ(i++));
snqMethods.put("2230972008180086195", new QueriesGenerated.SNQ(i++));
snqMethods.put("581316143751323365", new QueriesGenerated.SNQ(i++));
snqMethods.put("3121623838464340144", new QueriesGenerated.SNQ(i++));
snqMethods.put("5337495886742237353", new QueriesGenerated.SNQ(i++));
}
@NotNull
@Override
public SourceNodeQuery getSourceNodeQuery(@NotNull QueryKey identity) {
final String id = ((QueryKeyImpl) identity).getQueryNodeId().toString();
if (!(snqMethods.containsKey(id))) {
return super.getSourceNodeQuery(identity);
}
return snqMethods.get(id);
}
private static class SNQ implements SourceNodeQuery {
private final int methodKey;
public SNQ(int methodKey) {
this.methodKey = methodKey;
}
@Nullable
public SNode evaluate(@NotNull SourceSubstituteMacroNodeContext ctx) throws GenerationFailureException {
switch (methodKey) {
case 0:
return QueriesGenerated.sourceNodeQuery_5264392666049483255(ctx);
case 1:
return QueriesGenerated.sourceNodeQuery_6718223406753527992(ctx);
case 2:
return QueriesGenerated.sourceNodeQuery_6718223406753528020(ctx);
case 3:
return QueriesGenerated.sourceNodeQuery_647666612128187508(ctx);
case 4:
return QueriesGenerated.sourceNodeQuery_647666612128193000(ctx);
case 5:
return QueriesGenerated.sourceNodeQuery_2230972008180540589(ctx);
case 6:
return QueriesGenerated.sourceNodeQuery_6718223406753537895(ctx);
case 7:
return QueriesGenerated.sourceNodeQuery_2230972008180086146(ctx);
case 8:
return QueriesGenerated.sourceNodeQuery_2230972008180086170(ctx);
case 9:
return QueriesGenerated.sourceNodeQuery_2230972008180086195(ctx);
case 10:
return QueriesGenerated.sourceNodeQuery_581316143751323365(ctx);
case 11:
return QueriesGenerated.sourceNodeQuery_3121623838464340144(ctx);
case 12:
return QueriesGenerated.sourceNodeQuery_5337495886742237353(ctx);
default:
throw new GenerationFailureException(String.format("Inconsistent QueriesGenerated: there's no method for query %s (key: #%d)", ctx.getTemplateReference(), methodKey));
}
}
}
private final Map<String, SourceNodesQuery> snsqMethods = new HashMap<String, SourceNodesQuery>();
{
int i = 0;
snsqMethods.put("1889794043260277244", new QueriesGenerated.SNsQ(i++));
snsqMethods.put("1889794043260300882", new QueriesGenerated.SNsQ(i++));
snsqMethods.put("1889794043260130041", new QueriesGenerated.SNsQ(i++));
snsqMethods.put("5378595502815589459", new QueriesGenerated.SNsQ(i++));
snsqMethods.put("9012921169005027919", new QueriesGenerated.SNsQ(i++));
snsqMethods.put("2230972008180086208", new QueriesGenerated.SNsQ(i++));
snsqMethods.put("8036891771125815805", new QueriesGenerated.SNsQ(i++));
snsqMethods.put("7271443492838287069", new QueriesGenerated.SNsQ(i++));
snsqMethods.put("1085351927652268869", new QueriesGenerated.SNsQ(i++));
}
@NotNull
@Override
public SourceNodesQuery getSourceNodesQuery(@NotNull QueryKey identity) {
final String id = ((QueryKeyImpl) identity).getQueryNodeId().toString();
if (!(snsqMethods.containsKey(id))) {
return super.getSourceNodesQuery(identity);
}
return snsqMethods.get(id);
}
private static class SNsQ implements SourceNodesQuery {
private final int methodKey;
public SNsQ(int methodKey) {
this.methodKey = methodKey;
}
@NotNull
public Collection<SNode> evaluate(@NotNull SourceSubstituteMacroNodesContext ctx) throws GenerationFailureException {
switch (methodKey) {
case 0:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_1889794043260277244(ctx));
case 1:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_1889794043260300882(ctx));
case 2:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_1889794043260130041(ctx));
case 3:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_5378595502815589459(ctx));
case 4:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_9012921169005027919(ctx));
case 5:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_2230972008180086208(ctx));
case 6:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_8036891771125815805(ctx));
case 7:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_7271443492838287069(ctx));
case 8:
return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_1085351927652268869(ctx));
default:
throw new GenerationFailureException(String.format("Inconsistent QueriesGenerated: there's no method for query %s (key: #%d)", ctx.getTemplateReference(), methodKey));
}
}
}
private final Map<String, PropertyValueQuery> pvqMethods = new HashMap<String, PropertyValueQuery>();
{
int i = 0;
pvqMethods.put("1889794043260133525", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x57d533a7af15ed3dL, 0x57d533a7af15ed3eL, "text"), "concept"));
pvqMethods.put("1889794043260246446", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc59b314L, 0xf8cc59b315L, "value"), "0"));
pvqMethods.put("1889794043260295755", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc59b314L, 0xf8cc59b315L, "value"), "0"));
pvqMethods.put("1889794043260300863", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc59b314L, 0xf8cc59b315L, "value"), "0"));
pvqMethods.put("5378595502815609482", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc59b314L, 0xf8cc59b315L, "value"), "0"));
pvqMethods.put("5378595502815589440", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc59b314L, 0xf8cc59b315L, "value"), "0"));
pvqMethods.put("9012921169005027900", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc59b314L, 0xf8cc59b315L, "value"), "0"));
pvqMethods.put("7991477654791693984", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "IntentionsDescriptor"));
pvqMethods.put("647666612127743998", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "IntentionFactoryClass"));
pvqMethods.put("3927053800880514587", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b201L, 0xf8cc56b202L, "value"), "true"));
pvqMethods.put("3927053800880514597", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf93d565d10L, 0xf93d565d11L, "value"), "modelUID"));
pvqMethods.put("3927053800880514617", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf93d565d10L, 0xf93d565d11L, "value"), "nodeId"));
pvqMethods.put("2230972008179703477", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf93d565d10L, 0xf93d565d11L, "value"), "presentation"));
pvqMethods.put("286293695940675074", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b201L, 0xf8cc56b202L, "value"), null));
pvqMethods.put("5476379430792994476", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "NewIntentionFactory"));
pvqMethods.put("7506079045411260812", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf93d565d10L, 0xf93d565d11L, "value"), ""));
pvqMethods.put("7506079045411272170", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf93d565d10L, 0xf93d565d11L, "value"), ""));
}
@NotNull
@Override
public PropertyValueQuery getPropertyValueQuery(@NotNull QueryKey identity) {
final String id = identity.getTemplateNode().getNodeId().toString();
if (!(pvqMethods.containsKey(id))) {
return super.getPropertyValueQuery(identity);
}
return pvqMethods.get(id);
}
private static class PVQ extends PropertyValueQuery.Base {
private final int methodKey;
/*package*/ PVQ(int methodKey, SProperty property, String templateValue) {
super(property, templateValue);
this.methodKey = methodKey;
}
@Nullable
public Object evaluate(@NotNull PropertyMacroContext ctx) throws GenerationFailureException {
switch (methodKey) {
case 0:
return QueriesGenerated.propertyMacro_GetPropertyValue_1889794043260133526(ctx);
case 1:
return QueriesGenerated.propertyMacro_GetPropertyValue_1889794043260246447(ctx);
case 2:
return QueriesGenerated.propertyMacro_GetPropertyValue_1889794043260295756(ctx);
case 3:
return QueriesGenerated.propertyMacro_GetPropertyValue_1889794043260300864(ctx);
case 4:
return QueriesGenerated.propertyMacro_GetPropertyValue_5378595502815609483(ctx);
case 5:
return QueriesGenerated.propertyMacro_GetPropertyValue_5378595502815589441(ctx);
case 6:
return QueriesGenerated.propertyMacro_GetPropertyValue_9012921169005027901(ctx);
case 7:
return QueriesGenerated.propertyMacro_GetPropertyValue_7991477654791693985(ctx);
case 8:
return QueriesGenerated.propertyMacro_GetPropertyValue_647666612127743999(ctx);
case 9:
return QueriesGenerated.propertyMacro_GetPropertyValue_3927053800880514588(ctx);
case 10:
return QueriesGenerated.propertyMacro_GetPropertyValue_3927053800880514598(ctx);
case 11:
return QueriesGenerated.propertyMacro_GetPropertyValue_3927053800880514618(ctx);
case 12:
return QueriesGenerated.propertyMacro_GetPropertyValue_2230972008179703478(ctx);
case 13:
return QueriesGenerated.propertyMacro_GetPropertyValue_286293695940675180(ctx);
case 14:
return QueriesGenerated.propertyMacro_GetPropertyValue_5476379430792994477(ctx);
case 15:
return QueriesGenerated.propertyMacro_GetPropertyValue_7506079045411260813(ctx);
case 16:
return QueriesGenerated.propertyMacro_GetPropertyValue_7506079045411272171(ctx);
default:
throw new GenerationFailureException(String.format("Inconsistent QueriesGenerated: there's no method for query %s (key: #%d)", ctx.getTemplateReference(), methodKey));
}
}
}
private final Map<String, IfMacroCondition> imcMethods = new HashMap<String, IfMacroCondition>();
{
int i = 0;
imcMethods.put("2230972008180147291", new QueriesGenerated.IfMC(i++));
imcMethods.put("6960679590829154137", new QueriesGenerated.IfMC(i++));
imcMethods.put("3641631367668343948", new QueriesGenerated.IfMC(i++));
imcMethods.put("3641631367668343974", new QueriesGenerated.IfMC(i++));
imcMethods.put("6718223406753528000", new QueriesGenerated.IfMC(i++));
imcMethods.put("6718223406753528026", new QueriesGenerated.IfMC(i++));
imcMethods.put("8879227374728208771", new QueriesGenerated.IfMC(i++));
imcMethods.put("2230972008180463821", new QueriesGenerated.IfMC(i++));
imcMethods.put("2230972008180498305", new QueriesGenerated.IfMC(i++));
imcMethods.put("2230972008180722561", new QueriesGenerated.IfMC(i++));
imcMethods.put("8879227374728238183", new QueriesGenerated.IfMC(i++));
imcMethods.put("7506079045411026959", new QueriesGenerated.IfMC(i++));
imcMethods.put("8036891771125785353", new QueriesGenerated.IfMC(i++));
imcMethods.put("7271443492838287057", new QueriesGenerated.IfMC(i++));
imcMethods.put("1555068470914134306", new QueriesGenerated.IfMC(i++));
imcMethods.put("6295456526792107238", new QueriesGenerated.IfMC(i++));
}
@NotNull
@Override
public IfMacroCondition getIfMacroCondition(@NotNull QueryKey identity) {
final String id = identity.getTemplateNode().getNodeId().toString();
if (!(imcMethods.containsKey(id))) {
return super.getIfMacroCondition(identity);
}
return imcMethods.get(id);
}
private static class IfMC implements IfMacroCondition {
private final int methodKey;
public IfMC(int methodKey) {
this.methodKey = methodKey;
}
@Override
public boolean check(@NotNull IfMacroContext ctx) throws GenerationFailureException {
switch (methodKey) {
case 0:
return QueriesGenerated.ifMacro_Condition_2230972008180147293(ctx);
case 1:
return QueriesGenerated.ifMacro_Condition_6960679590829154139(ctx);
case 2:
return QueriesGenerated.ifMacro_Condition_3641631367668343949(ctx);
case 3:
return QueriesGenerated.ifMacro_Condition_3641631367668343975(ctx);
case 4:
return QueriesGenerated.ifMacro_Condition_6718223406753528001(ctx);
case 5:
return QueriesGenerated.ifMacro_Condition_6718223406753528027(ctx);
case 6:
return QueriesGenerated.ifMacro_Condition_8879227374728208773(ctx);
case 7:
return QueriesGenerated.ifMacro_Condition_2230972008180463823(ctx);
case 8:
return QueriesGenerated.ifMacro_Condition_2230972008180498307(ctx);
case 9:
return QueriesGenerated.ifMacro_Condition_2230972008180722563(ctx);
case 10:
return QueriesGenerated.ifMacro_Condition_8879227374728238185(ctx);
case 11:
return QueriesGenerated.ifMacro_Condition_7506079045411026961(ctx);
case 12:
return QueriesGenerated.ifMacro_Condition_8036891771125785355(ctx);
case 13:
return QueriesGenerated.ifMacro_Condition_7271443492838287058(ctx);
case 14:
return QueriesGenerated.ifMacro_Condition_1555068470914134308(ctx);
case 15:
return QueriesGenerated.ifMacro_Condition_6295456526792107240(ctx);
default:
throw new GenerationFailureException(String.format("Inconsistent QueriesGenerated: there's no condition method for if macro %s (key: #%d)", ctx.getTemplateReference(), methodKey));
}
}
}
private final Map<String, ReferenceTargetQuery> rtqMethods = new HashMap<String, ReferenceTargetQuery>();
{
rtqMethods.put("5264392666049409974", new QueriesGenerated.RTQ(0, "myParameter"));
rtqMethods.put("1188842953199099125", new QueriesGenerated.RTQ(1, "myParameter"));
rtqMethods.put("1889794043260293447", new QueriesGenerated.RTQ(2, "IntentionFactoryClass"));
rtqMethods.put("1889794043260329902", new QueriesGenerated.RTQ(3, "Object"));
rtqMethods.put("6551427688186219814", new QueriesGenerated.RTQ(4, "BaseConcept"));
rtqMethods.put("5378595502815589450", new QueriesGenerated.RTQ(5, "IntentionFactoryClass"));
rtqMethods.put("1738609523201655645", new QueriesGenerated.RTQ(6, "Object"));
rtqMethods.put("2230972008180633737", new QueriesGenerated.RTQ(7, "IntentionImplementationStub"));
rtqMethods.put("1145475927579234606", new QueriesGenerated.RTQ(8, "BaseConcept"));
rtqMethods.put("2230972008180658533", new QueriesGenerated.RTQ(9, "IntentionImplementationStub"));
rtqMethods.put("581316143750725399", new QueriesGenerated.RTQ(10, "BaseConcept"));
rtqMethods.put("7311909354344303051", new QueriesGenerated.RTQ(11, "isSurroundWith"));
rtqMethods.put("4147950839246952263", new QueriesGenerated.RTQ(12, "IntentionsDescriptor"));
}
@NotNull
@Override
public ReferenceTargetQuery getReferenceTargetQuery(@NotNull QueryKey queryKey) {
final String id = queryKey.getTemplateNode().getNodeId().toString();
if (!(rtqMethods.containsKey(id))) {
return super.getReferenceTargetQuery(queryKey);
}
return rtqMethods.get(id);
}
private static class RTQ extends ReferenceTargetQuery.Base {
private final int methodKey;
/*package*/ RTQ(int methodKey, String templateValue) {
super(templateValue);
this.methodKey = methodKey;
}
@Nullable
public Object evaluate(@NotNull ReferenceMacroContext ctx) throws GenerationFailureException {
switch (methodKey) {
case 0:
return QueriesGenerated.referenceMacro_GetReferent_5264392666049409975(ctx);
case 1:
return QueriesGenerated.referenceMacro_GetReferent_1188842953199099126(ctx);
case 2:
return QueriesGenerated.referenceMacro_GetReferent_1889794043260293448(ctx);
case 3:
return QueriesGenerated.referenceMacro_GetReferent_1889794043260329903(ctx);
case 4:
return QueriesGenerated.referenceMacro_GetReferent_6551427688186219815(ctx);
case 5:
return QueriesGenerated.referenceMacro_GetReferent_5378595502815589451(ctx);
case 6:
return QueriesGenerated.referenceMacro_GetReferent_1738609523201655646(ctx);
case 7:
return QueriesGenerated.referenceMacro_GetReferent_2230972008180633738(ctx);
case 8:
return QueriesGenerated.referenceMacro_GetReferent_1145475927579234607(ctx);
case 9:
return QueriesGenerated.referenceMacro_GetReferent_2230972008180658534(ctx);
case 10:
return QueriesGenerated.referenceMacro_GetReferent_581316143750725400(ctx);
case 11:
return QueriesGenerated.referenceMacro_GetReferent_7311909354344303052(ctx);
case 12:
return QueriesGenerated.referenceMacro_GetReferent_4147950839246952264(ctx);
default:
throw new GenerationFailureException(String.format("Inconsistent QueriesGenerated: there's no method for query %s (key: #%d)", ctx.getTemplateReference(), methodKey));
}
}
}
private final Map<String, VariableValueQuery> vvqMethods = new HashMap<String, VariableValueQuery>();
{
vvqMethods.put("1889794043260126822", new QueriesGenerated.VVQ(0));
vvqMethods.put("1889794043260126785", new QueriesGenerated.VVQ(1));
vvqMethods.put("32126802637421737", new QueriesGenerated.VVQ(2));
vvqMethods.put("7506079045410944018", new QueriesGenerated.VVQ(3));
vvqMethods.put("8036891771125728383", new QueriesGenerated.VVQ(4));
vvqMethods.put("7271443492838287039", new QueriesGenerated.VVQ(5));
}
@NotNull
@Override
public VariableValueQuery getVariableValueQuery(@NotNull QueryKey queryKey) {
final String id = queryKey.getTemplateNode().getNodeId().toString();
if (!(vvqMethods.containsKey(id))) {
return super.getVariableValueQuery(queryKey);
}
return vvqMethods.get(id);
}
private static class VVQ implements VariableValueQuery {
private final int methodKey;
/*package*/ VVQ(int methodKey) {
this.methodKey = methodKey;
}
@Nullable
public Object evaluate(@NotNull TemplateVarContext ctx) throws GenerationFailureException {
switch (methodKey) {
case 0:
return QueriesGenerated.insertMacro_varValue_1889794043260126824(ctx);
case 1:
return QueriesGenerated.insertMacro_varValue_1889794043260126787(ctx);
case 2:
return QueriesGenerated.insertMacro_varValue_32126802637421739(ctx);
case 3:
return QueriesGenerated.insertMacro_varValue_7506079045410944020(ctx);
case 4:
return QueriesGenerated.insertMacro_varValue_8036891771125728385(ctx);
case 5:
return QueriesGenerated.insertMacro_varValue_7271443492838287040(ctx);
default:
throw new GenerationFailureException(String.format("Inconsistent QueriesGenerated: there's no method for query %s (key: #%d)", ctx.getTemplateReference(), methodKey));
}
}
}
}