package jetbrains.mps.lang.textGen.generator.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 jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import jetbrains.mps.baseLanguage.behavior.ConceptFunctionParameter__BehaviorDescriptor; import org.jetbrains.mps.openapi.model.SModel; import org.jetbrains.mps.openapi.model.SNode; import jetbrains.mps.baseLanguage.behavior.ClassConcept__BehaviorDescriptor; import jetbrains.mps.internal.collections.runtime.Sequence; import jetbrains.mps.internal.collections.runtime.IWhereFilter; import jetbrains.mps.internal.collections.runtime.ListSequence; import jetbrains.mps.typesystem.inference.TypeChecker; import jetbrains.mps.lang.typesystem.runtime.HUtil; import jetbrains.mps.generator.template.PropertyMacroContext; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SModelOperations; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; import jetbrains.mps.util.NameUtil; import jetbrains.mps.generator.template.ReferenceMacroContext; import jetbrains.mps.generator.template.IfMacroContext; import jetbrains.mps.lang.structure.behavior.AbstractConceptDeclaration__BehaviorDescriptor; import jetbrains.mps.lang.textGen.behavior.ConceptTextGenDeclaration__BehaviorDescriptor; import jetbrains.mps.generator.template.SourceSubstituteMacroNodeContext; import jetbrains.mps.generator.template.SourceSubstituteMacroNodesContext; import java.util.List; import jetbrains.mps.generator.template.TemplateVarContext; import jetbrains.mps.internal.collections.runtime.ISelector; 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.MapRootRuleCondition; import jetbrains.mps.generator.template.MapRootRuleContext; 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; import org.jetbrains.mps.openapi.persistence.PersistenceFacade; import jetbrains.mps.smodel.SModelUtil_new; import jetbrains.mps.smodel.SReference; @Generated public class QueriesGenerated extends QueryProviderBase { public QueriesGenerated() { super(1); } public static boolean createRootRule_Condition_9221686591909407403(final CreateRootRuleContext _context) { // see MPS-24613 return SModuleOperations.isAspect(_context.getOriginalInputModel(), "textGen"); } public static boolean baseMappingRule_Condition_3741392693833960322(final BaseMappingRuleContext _context) { return (SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x11f41304578L, "textGenBlock")) != null); } public static boolean baseMappingRule_Condition_663595348025639958(final BaseMappingRuleContext _context) { return (boolean) ConceptFunctionParameter__BehaviorDescriptor.getFromParameterObject_idhEwJh7s.invoke(_context.getNode()); } public static boolean baseMappingRule_Condition_663595348025645461(final BaseMappingRuleContext _context) { return !((boolean) ConceptFunctionParameter__BehaviorDescriptor.getFromParameterObject_idhEwJh7s.invoke(_context.getNode())); } public static boolean baseMappingRule_Condition_1570228009929814973(final BaseMappingRuleContext _context) { // see MPS-24613 return SModuleOperations.isAspect(((SModel) _context.getVariable("model")), "textGen"); } public static boolean baseMappingRule_Condition_2170558324035943543(final BaseMappingRuleContext _context) { // CASE for a class declaration with default or no-arg constructor Iterable<SNode> constructors = ClassConcept__BehaviorDescriptor.constructors_id4_LVZ3pCvsd.invoke(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x377692d961ac9073L, 0x377692d961ac9076L, "classifier"))); if (Sequence.fromIterable(constructors).isEmpty()) { return true; } if ((Sequence.fromIterable(constructors).findFirst(new IWhereFilter<SNode>() { public boolean accept(SNode it) { return ListSequence.fromList(SLinkOperations.getChildren(it, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0xf8cc56b1feL, "parameter"))).count() == 1 && (TypeChecker.getInstance().getRuntimeSupport().coerce_(SLinkOperations.getTarget(ListSequence.fromList(SLinkOperations.getChildren(it, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0xf8cc56b1feL, "parameter"))).first(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x450368d90ce15bc3L, 0x4ed4d318133c80ceL, "type")), HUtil.createMatchingPatternByConcept(MetaAdapterFactory.getConcept(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x108f968b3caL, "jetbrains.mps.lang.smodel.structure.SNodeType")), true) != null); } }) != null)) { return false; } // coerce below is my desperate attempt to write a check if parameter type is SNode. If you know better way, go ahead and change this if ((Sequence.fromIterable(constructors).findFirst(new IWhereFilter<SNode>() { public boolean accept(SNode it) { return ListSequence.fromList(SLinkOperations.getChildren(it, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0xf8cc56b1feL, "parameter"))).count() == 1 && eq_x583g4_a0a0a0a0a0a0a5a6(SLinkOperations.getTarget(TypeChecker.getInstance().getRuntimeSupport().coerce_(SLinkOperations.getTarget(ListSequence.fromList(SLinkOperations.getChildren(it, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0xf8cc56b1feL, "parameter"))).first(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x450368d90ce15bc3L, 0x4ed4d318133c80ceL, "type")), HUtil.createMatchingPatternByConcept(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101de48bf9eL, "jetbrains.mps.baseLanguage.structure.ClassifierType")), true), MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101de48bf9eL, 0x101de490babL, "classifier")), SLinkOperations.getTarget(_quotation_createNode_x583g4_a0a0a0a0a0f0g(), MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101de48bf9eL, 0x101de490babL, "classifier"))); } }) != null)) { return false; } return true; } public static Object propertyMacro_GetPropertyValue_1233679994384(final PropertyMacroContext _context) { return SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")); } public static Object propertyMacro_GetPropertyValue_1233930145391(final PropertyMacroContext _context) { return SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")); } public static Object propertyMacro_GetPropertyValue_1237212089067(final PropertyMacroContext _context) { return SModelOperations.getModelName(SNodeOperations.getModel(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f4b71f51fL, 0x11f7eb142ecL, "baseTextGen")))) + "." + SPropertyOperations.getString(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f4b71f51fL, 0x11f7eb142ecL, "baseTextGen")), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")); } public static Object propertyMacro_GetPropertyValue_4710719082913003852(final PropertyMacroContext _context) { return SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")); } public static Object propertyMacro_GetPropertyValue_4710719082912997785(final PropertyMacroContext _context) { return SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")); } public static Object propertyMacro_GetPropertyValue_2170558324036319290(final PropertyMacroContext _context) { return "contextObjectInstance_" + SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")); } public static Object propertyMacro_GetPropertyValue_1237216130332(final PropertyMacroContext _context) { SNode tg = SNodeOperations.getNodeAncestor(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f6faa8c98L, 0x11f6fac17ecL, "function")), MetaAdapterFactory.getConcept(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f4b71f51fL, "jetbrains.mps.lang.textGen.structure.LanguageTextGenDeclaration"), false, false); return SModelOperations.getModelName(SNodeOperations.getModel(tg)) + "." + SPropertyOperations.getString(tg, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")); } public static Object propertyMacro_GetPropertyValue_1237216146977(final PropertyMacroContext _context) { return SPropertyOperations.getString(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f6faa8c98L, 0x11f6fac17ecL, "function")), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")); } public static Object propertyMacro_GetPropertyValue_1237213172356(final PropertyMacroContext _context) { return SPropertyOperations.getString(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f4ba6faaaL, 0x11f5b7f02d9L, "function")), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")); } public static Object propertyMacro_GetPropertyValue_1237213172365(final PropertyMacroContext _context) { SNode tg = SNodeOperations.getNodeAncestor(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f4ba6faaaL, 0x11f5b7f02d9L, "function")), MetaAdapterFactory.getConcept(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f4b71f51fL, "jetbrains.mps.lang.textGen.structure.LanguageTextGenDeclaration"), false, false); return SModelOperations.getModelName(SNodeOperations.getModel(tg)) + "." + SPropertyOperations.getString(tg, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")); } public static Object propertyMacro_GetPropertyValue_4710719082913170838(final PropertyMacroContext _context) { return SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x12015288286L, 0x1201528caacL, "value")); } public static Object propertyMacro_GetPropertyValue_4710719082913183685(final PropertyMacroContext _context) { return SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x1201527819cL, 0x120152f5107L, "separator")); } public static Object propertyMacro_GetPropertyValue_998325320688484713(final PropertyMacroContext _context) { return SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")); } public static Object propertyMacro_GetPropertyValue_1697917907977178166(final PropertyMacroContext _context) { return SPropertyOperations.getString(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x377692d961ab5a81L, 0x377692d961ab5a82L, "context")), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")); } public static Object propertyMacro_GetPropertyValue_7106796582840914993(final PropertyMacroContext _context) { // FIXME this is a hack to construct name of class from structure aspect, once x-model generation is here, internal type would get replaced with reference macro return NameUtil.conceptFQNameFromNamespaceAndShortName(SPropertyOperations.getString(SModelOperations.getModuleStub(_context.getOriginalInputModel()), MetaAdapterFactory.getProperty(0x86ef829012bb4ca7L, 0x947f093788f263a9L, 0x5869770da61dfe1eL, 0x5869770da61dfe23L, "namespace")), _context.getTemplateValue()); } public static Object propertyMacro_GetPropertyValue_7106796582840974706(final PropertyMacroContext _context) { // FIXME this is a hack to construct name of class from structure aspect, once x-model generation is here, internal type would get replaced with reference macro return NameUtil.conceptFQNameFromNamespaceAndShortName(SPropertyOperations.getString(SModelOperations.getModuleStub(_context.getOriginalInputModel()), MetaAdapterFactory.getProperty(0x86ef829012bb4ca7L, 0x947f093788f263a9L, 0x5869770da61dfe1eL, 0x5869770da61dfe23L, "namespace")), _context.getTemplateValue()); } public static Object propertyMacro_GetPropertyValue_7106796582841111311(final PropertyMacroContext _context) { // FIXME this is a hack to construct name of the constant from LCS, once x-model generation is here, would get replaced with reference macro return SPropertyOperations.getString(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x11f3c7a3d4dL, "conceptDeclaration")), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")); } public static Object propertyMacro_GetPropertyValue_7106796582841111992(final PropertyMacroContext _context) { // FIXME this is a hack to construct name of class from structure aspect, once x-model generation is here, internal type would get replaced with reference macro return NameUtil.conceptFQNameFromNamespaceAndShortName(SPropertyOperations.getString(SModelOperations.getModuleStub(_context.getOriginalInputModel()), MetaAdapterFactory.getProperty(0x86ef829012bb4ca7L, 0x947f093788f263a9L, 0x5869770da61dfe1eL, 0x5869770da61dfe23L, "namespace")), _context.getTemplateValue()); } public static Object propertyMacro_GetPropertyValue_3240099288359334173(final PropertyMacroContext _context) { return "getFileName_" + SPropertyOperations.getString(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x11f3c7a3d4dL, "conceptDeclaration")), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")); } public static Object propertyMacro_GetPropertyValue_5234914442344905231(final PropertyMacroContext _context) { return "getFileExtension_" + SPropertyOperations.getString(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x11f3c7a3d4dL, "conceptDeclaration")), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")); } public static Object propertyMacro_GetPropertyValue_8098116031886524630(final PropertyMacroContext _context) { return SPropertyOperations.getString(SNodeOperations.as(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x10fd02ec599e8fbeL, "encoding")), MetaAdapterFactory.getConcept(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x63754d97e1c86b8cL, "jetbrains.mps.lang.textGen.structure.EncodingLiteral")), MetaAdapterFactory.getProperty(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x63754d97e1c86b8cL, 0x63754d97e1c86b8dL, "encoding")); } public static Object propertyMacro_GetPropertyValue_8098116031886806272(final PropertyMacroContext _context) { return _context.getTemplateValue() + '_' + SPropertyOperations.getString(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x11f3c7a3d4dL, "conceptDeclaration")), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")); } public static Object propertyMacro_GetPropertyValue_8098116031886827488(final PropertyMacroContext _context) { return _context.getTemplateValue() + '_' + SPropertyOperations.getString(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x11f3c7a3d4dL, "conceptDeclaration")), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")); } public static Object propertyMacro_GetPropertyValue_2170558324036671925(final PropertyMacroContext _context) { return SPropertyOperations.getString(_context.getNode(), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")); } public static Object propertyMacro_GetPropertyValue_998325320688382608(final PropertyMacroContext _context) { return _context.getTemplateValue() + ((Integer) _context.getVariable("cv:c")); } public static Object referenceMacro_GetReferent_7832257118928273454(final ReferenceMacroContext _context) { return _context.getOutputNodeByInputNodeAndMappingLabel(_context.getNode(), "GetFilename"); } public static Object referenceMacro_GetReferent_7832257118928275275(final ReferenceMacroContext _context) { return _context.getOutputNodeByInputNodeAndMappingLabel(_context.getNode(), "GetExtension"); } public static Object referenceMacro_GetReferent_8098116031886788392(final ReferenceMacroContext _context) { return _context.getOutputNodeByInputNodeAndMappingLabel(_context.getNode(), "GetEncoding"); } public static Object referenceMacro_GetReferent_7832257118928276829(final ReferenceMacroContext _context) { return _context.getOutputNodeByInputNodeAndMappingLabel(_context.getNode(), "GetTextUnit"); } public static Object referenceMacro_GetReferent_4147950839246952264(final ReferenceMacroContext _context) { // TODO genContext.get output TextGenAspectDescriptorCons for model model; return SModelOperations.getModelName(((SModel) _context.getVariable("model"))) + ".TextGenAspectDescriptor"; } public static Object referenceMacro_GetReferent_2170558324036126545(final ReferenceMacroContext _context) { return SPropertyOperations.getString(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x377692d961ac9073L, 0x377692d961ac9076L, "classifier")), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")); } public static Object referenceMacro_GetReferent_2170558324035932093(final ReferenceMacroContext _context) { return SPropertyOperations.getString(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x377692d961ac9073L, 0x377692d961ac9076L, "classifier")), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")); } public static Object referenceMacro_GetReferent_1697917907977190736(final ReferenceMacroContext _context) { return SLinkOperations.getTarget(TypeChecker.getInstance().getRuntimeSupport().coerce_(SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x377692d961ab5a81L, 0x377692d961ab5a82L, "context")), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x377692d961aaee79L, 0x377692d961aaee7eL, "type")), HUtil.createMatchingPatternByConcept(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101de48bf9eL, "jetbrains.mps.baseLanguage.structure.ClassifierType")), true), MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101de48bf9eL, 0x101de490babL, "classifier")); } public static Object referenceMacro_GetReferent_7106796582841250423(final ReferenceMacroContext _context) { return _context.getOutputNodeByInputNodeAndMappingLabel(_context.getNode(), "TextGenClass"); } public static Object referenceMacro_GetReferent_8255719797765085434(final ReferenceMacroContext _context) { return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x11f3c7a3d4dL, "conceptDeclaration")); } public static Object referenceMacro_GetReferent_2170558324037477105(final ReferenceMacroContext _context) { return _context.getOutputNodeByInputNodeAndMappingLabel(SNodeOperations.getNodeAncestor(_context.getNode(), MetaAdapterFactory.getConcept(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f4b71f51fL, "jetbrains.mps.lang.textGen.structure.LanguageTextGenDeclaration"), false, false), "LanguageUtilityClass"); } public static boolean ifMacro_Condition_274316186079995491(final IfMacroContext _context) { return Sequence.fromIterable(AbstractConceptDeclaration__BehaviorDescriptor.getAllSuperConcepts_id2A8AB0rAWpG.invoke(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x11f3c7a3d4dL, "conceptDeclaration")), ((boolean) false))).contains(SNodeOperations.getNode("r:3b7ed80f-6cfd-45bc-b051-2f66c620dd27(jetbrains.mps.lang.traceable.structure)", "5067982036267369891")); } public static boolean ifMacro_Condition_274316186080011604(final IfMacroContext _context) { return Sequence.fromIterable(AbstractConceptDeclaration__BehaviorDescriptor.getAllSuperConcepts_id2A8AB0rAWpG.invoke(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x11f3c7a3d4dL, "conceptDeclaration")), ((boolean) false))).contains(SNodeOperations.getNode("r:3b7ed80f-6cfd-45bc-b051-2f66c620dd27(jetbrains.mps.lang.traceable.structure)", "5067982036267369890")); } public static boolean ifMacro_Condition_274316186080025110(final IfMacroContext _context) { return Sequence.fromIterable(AbstractConceptDeclaration__BehaviorDescriptor.getAllSuperConcepts_id2A8AB0rAWpG.invoke(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x11f3c7a3d4dL, "conceptDeclaration")), ((boolean) false))).contains(SNodeOperations.getNode("r:3b7ed80f-6cfd-45bc-b051-2f66c620dd27(jetbrains.mps.lang.traceable.structure)", "5067982036267369892")); } public static boolean ifMacro_Condition_274316186080061493(final IfMacroContext _context) { return Sequence.fromIterable(AbstractConceptDeclaration__BehaviorDescriptor.getAllSuperConcepts_id2A8AB0rAWpG.invoke(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x11f3c7a3d4dL, "conceptDeclaration")), ((boolean) false))).contains(SNodeOperations.getNode("r:3b7ed80f-6cfd-45bc-b051-2f66c620dd27(jetbrains.mps.lang.traceable.structure)", "5067982036267369891")); } public static boolean ifMacro_Condition_274316186080085200(final IfMacroContext _context) { return Sequence.fromIterable(AbstractConceptDeclaration__BehaviorDescriptor.getAllSuperConcepts_id2A8AB0rAWpG.invoke(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x11f3c7a3d4dL, "conceptDeclaration")), ((boolean) false))).contains(SNodeOperations.getNode("r:3b7ed80f-6cfd-45bc-b051-2f66c620dd27(jetbrains.mps.lang.traceable.structure)", "5067982036267369890")); } public static boolean ifMacro_Condition_274316186080110427(final IfMacroContext _context) { return Sequence.fromIterable(AbstractConceptDeclaration__BehaviorDescriptor.getAllSuperConcepts_id2A8AB0rAWpG.invoke(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x11f3c7a3d4dL, "conceptDeclaration")), ((boolean) false))).contains(SNodeOperations.getNode("r:3b7ed80f-6cfd-45bc-b051-2f66c620dd27(jetbrains.mps.lang.traceable.structure)", "5067982036267369892")); } public static boolean ifMacro_Condition_3101153546911107996(final IfMacroContext _context) { return Sequence.fromIterable(AbstractConceptDeclaration__BehaviorDescriptor.getAllSuperConcepts_id2A8AB0rAWpG.invoke(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x11f3c7a3d4dL, "conceptDeclaration")), ((boolean) false))).any(new IWhereFilter<SNode>() { public boolean accept(SNode it) { return it == SNodeOperations.getNode("r:3b7ed80f-6cfd-45bc-b051-2f66c620dd27(jetbrains.mps.lang.traceable.structure)", "5067982036267369891") || it == SNodeOperations.getNode("r:3b7ed80f-6cfd-45bc-b051-2f66c620dd27(jetbrains.mps.lang.traceable.structure)", "5067982036267369890") || it == SNodeOperations.getNode("r:3b7ed80f-6cfd-45bc-b051-2f66c620dd27(jetbrains.mps.lang.traceable.structure)", "5067982036267369892"); } }); } public static boolean ifMacro_Condition_1237214781943(final IfMacroContext _context) { return (SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f4b71f51fL, 0x11f7eb142ecL, "baseTextGen")) != null); } public static boolean ifMacro_Condition_4710719082913305450(final IfMacroContext _context) { return SPropertyOperations.getBoolean(_context.getNode(), MetaAdapterFactory.getProperty(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x12015251a28L, 0x12015341f3eL, "withIndent")); } public static boolean ifMacro_Condition_1408971595082527143(final IfMacroContext _context) { return TypeChecker.getInstance().getSubtypingManager().isSubtype(TypeChecker.getInstance().getTypeOf(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x12015251a28L, 0x120152c1030L, "value"))), _quotation_createNode_x583g4_b0a0a25()); } public static boolean ifMacro_Condition_4710719082913199467(final IfMacroContext _context) { return SPropertyOperations.getBoolean(_context.getNode(), MetaAdapterFactory.getProperty(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x12015251a28L, 0x12015341f3eL, "withIndent")); } public static boolean ifMacro_Condition_3135747254706207524(final IfMacroContext _context) { return (SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x120153077caL, 0x2b846983a62af1c4L, "textArea")) != null); } public static boolean ifMacro_Condition_3135747254706212715(final IfMacroContext _context) { return (SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x120153077caL, 0x2b846983a62af1c4L, "textArea")) != null); } public static boolean ifMacro_Condition_4710719082913168506(final IfMacroContext _context) { return SPropertyOperations.getBoolean(_context.getNode(), MetaAdapterFactory.getProperty(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x12015288286L, 0x1201534c74dL, "withIndent")); } public static boolean ifMacro_Condition_4710719082913181829(final IfMacroContext _context) { return !(SPropertyOperations.getBoolean(_context.getNode(), MetaAdapterFactory.getProperty(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x1201527819cL, 0x1203d98429fL, "withSeparator"))); } public static boolean ifMacro_Condition_4710719082913298087(final IfMacroContext _context) { return (SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f7f7ff1bdL, 0x1201f00bb34L, "text")) != null); } public static boolean ifMacro_Condition_8098116031886749454(final IfMacroContext _context) { return !(SNodeOperations.isInstanceOf(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x10fd02ec599e8fbeL, "encoding")), MetaAdapterFactory.getConcept(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x63754d97e1c86b8cL, "jetbrains.mps.lang.textGen.structure.EncodingLiteral"))); } public static boolean ifMacro_Condition_8098116031886781586(final IfMacroContext _context) { return (SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x10fd02ec599e8fbeL, "encoding")) != null); } public static boolean ifMacro_Condition_998325320688366204(final IfMacroContext _context) { return !((boolean) ConceptTextGenDeclaration__BehaviorDescriptor.needsUnitConfigure_id1SvnOIGt_fM.invoke(_context.getNode())); } public static boolean ifMacro_Condition_998325320688500464(final IfMacroContext _context) { return ((SNode) _context.getVariable("parentPart")) == null; } public static boolean ifMacro_Condition_7832257118928478526(final IfMacroContext _context) { return ((SNode) _context.getVariable("parentPart")) != null; } public static boolean ifMacro_Condition_7106796582841423812(final IfMacroContext _context) { return ListSequence.fromList(SModelOperations.roots(_context.getInputModel(), MetaAdapterFactory.getConcept(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, "jetbrains.mps.lang.textGen.structure.ConceptTextGenDeclaration"))).any(new IWhereFilter<SNode>() { public boolean accept(SNode it) { return (boolean) ConceptTextGenDeclaration__BehaviorDescriptor.shallProduceOutputUnit_id3fG6dkhfrk3.invoke(it); } }); } public static boolean ifMacro_Condition_3240099288359315176(final IfMacroContext _context) { return (SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0xa0f73089d631ccL, "filename")) == null); } public static boolean ifMacro_Condition_5234914442344905176(final IfMacroContext _context) { return (SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x6ee6b5c5ad5f7279L, "extension")) == null); } public static boolean ifMacro_Condition_2170558324036772384(final IfMacroContext _context) { return (SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x2bad879ac8f27decL, "layout")) != null); } public static boolean ifMacro_Condition_998325320688469461(final IfMacroContext _context) { return (SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x2bad879ac8f27decL, "layout")), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x2bad879ac8f27dc9L, 0x2bad879ac8f27dcdL, "active")) != null); } public static boolean ifMacro_Condition_8098116031886688666(final IfMacroContext _context) { return !(SNodeOperations.isInstanceOf(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x10fd02ec599e8fbeL, "encoding")), MetaAdapterFactory.getConcept(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x63754d97e1c86b8cL, "jetbrains.mps.lang.textGen.structure.EncodingLiteral"))); } public static boolean ifMacro_Condition_8098116031886667019(final IfMacroContext _context) { return (SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x10fd02ec599e8fbeL, "encoding")) != null); } public static boolean ifMacro_Condition_2170558324036796288(final IfMacroContext _context) { return (SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x2bad879ac8f27decL, "layout")) != null); } public static SNode sourceNodeQuery_4710719082912997766(final SourceSubstituteMacroNodeContext _context) { return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0xf8cc56b1fdL, "returnType")); } public static SNode sourceNodeQuery_2170558324034357315(final SourceSubstituteMacroNodeContext _context) { return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x377692d961aaee79L, 0x377692d961ac9078L, "instance")); } public static SNode sourceNodeQuery_2170558324034351897(final SourceSubstituteMacroNodeContext _context) { return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x377692d961aaee79L, 0x377692d961aaee7eL, "type")); } public static SNode sourceNodeQuery_8958762413370113782(final SourceSubstituteMacroNodeContext _context) { return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x12015251a28L, 0x120152c1030L, "value")); } public static SNode sourceNodeQuery_4710719082913202717(final SourceSubstituteMacroNodeContext _context) { return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x12015251a28L, 0x120152c1030L, "value")); } public static SNode sourceNodeQuery_3135747254706218420(final SourceSubstituteMacroNodeContext _context) { return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x120153077caL, 0x2b846983a62af1c4L, "textArea")); } public static SNode sourceNodeQuery_4710719082913181675(final SourceSubstituteMacroNodeContext _context) { return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x1201527819cL, 0x120152e6dcfL, "list")); } public static SNode sourceNodeQuery_4710719082913183642(final SourceSubstituteMacroNodeContext _context) { return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x1201527819cL, 0x120152e6dcfL, "list")); } public static SNode sourceNodeQuery_4710719082913298096(final SourceSubstituteMacroNodeContext _context) { return SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f7f7ff1bdL, 0x1201f00bb34L, "text")); } public static SNode sourceNodeQuery_998325320688504218(final SourceSubstituteMacroNodeContext _context) { return ((SNode) _context.getVariable("parentPart")); } public static SNode sourceNodeQuery_7832257118928369557(final SourceSubstituteMacroNodeContext _context) { return SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x2bad879ac8f27decL, "layout")), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x2bad879ac8f27dc9L, 0x2bad879ac8f27dcdL, "active")); } public static Iterable<SNode> sourceNodesQuery_1237473086491(final SourceSubstituteMacroNodesContext _context) { return SLinkOperations.getChildren(SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x11f41304578L, "textGenBlock")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x108bbca0f48L, 0x108bbd29b4aL, "body")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b200L, 0xf8cc6bf961L, "statement")); } public static Iterable<SNode> sourceNodesQuery_4710719082913003825(final SourceSubstituteMacroNodesContext _context) { return SLinkOperations.getChildren(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0xf8cc56b1ffL, "body")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b200L, 0xf8cc6bf961L, "statement")); } public static Iterable<SNode> sourceNodesQuery_4710719082913003836(final SourceSubstituteMacroNodesContext _context) { return SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0xf8cc56b1feL, "parameter")); } public static Iterable<SNode> sourceNodesQuery_4710719082913003845(final SourceSubstituteMacroNodesContext _context) { return SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f4b71f51fL, 0x11f4b821fc5L, "operation")); } public static Iterable<SNode> sourceNodesQuery_4710719082912997756(final SourceSubstituteMacroNodesContext _context) { return SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0xf8cc56b1feL, "parameter")); } public static Iterable<SNode> sourceNodesQuery_4710719082912997776(final SourceSubstituteMacroNodesContext _context) { return SLinkOperations.getChildren(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b1fcL, 0xf8cc56b1ffL, "body")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b200L, 0xf8cc6bf961L, "statement")); } public static Iterable<SNode> sourceNodesQuery_4710719082912997792(final SourceSubstituteMacroNodesContext _context) { return SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f4b71f51fL, 0x11f6f8860bdL, "function")); } public static Iterable<SNode> sourceNodesQuery_2170558324034351308(final SourceSubstituteMacroNodesContext _context) { return SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f4b71f51fL, 0x377692d961abfe2aL, "contextObjects")); } public static Iterable<SNode> sourceNodesQuery_1237216160530(final SourceSubstituteMacroNodesContext _context) { return SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f6faa8c98L, 0x11f6fac4585L, "parameter")); } public static Iterable<SNode> sourceNodesQuery_1237213172348(final SourceSubstituteMacroNodesContext _context) { return SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f4ba6faaaL, 0x11f5b891231L, "parameter")); } public static Iterable<SNode> sourceNodesQuery_1237470011010(final SourceSubstituteMacroNodesContext _context) { return SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x120153077caL, 0x12015310576L, "part")); } public static Iterable<SNode> sourceNodesQuery_4710719082913287761(final SourceSubstituteMacroNodesContext _context) { return SLinkOperations.getChildren(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11fd28e1146L, 0x11fd28f940dL, "list")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b200L, 0xf8cc6bf961L, "statement")); } public static Iterable<SNode> sourceNodesQuery_7832257118928381083(final SourceSubstituteMacroNodesContext _context) { return SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x2bad879ac8f27dcaL, 0x2bad879ac8f27dd2L, "nested")); } public static Iterable<SNode> sourceNodesQuery_7106796582841120204(final SourceSubstituteMacroNodesContext _context) { return ((List<SNode>) _context.getVariable("var:sortedTextGenerators")); } public static Iterable<SNode> sourceNodesQuery_8255719797765085441(final SourceSubstituteMacroNodesContext _context) { return ListSequence.fromList(SModelOperations.roots(_context.getInputModel(), MetaAdapterFactory.getConcept(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, "jetbrains.mps.lang.textGen.structure.ConceptTextGenDeclaration"))).where(new IWhereFilter<SNode>() { public boolean accept(SNode it) { return (boolean) ConceptTextGenDeclaration__BehaviorDescriptor.shallProduceOutputUnit_id3fG6dkhfrk3.invoke(it); } }); } public static Iterable<SNode> sourceNodesQuery_3240099288359323739(final SourceSubstituteMacroNodesContext _context) { return SLinkOperations.getChildren(SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0xa0f73089d631ccL, "filename")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x108bbca0f48L, 0x108bbd29b4aL, "body")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b200L, 0xf8cc6bf961L, "statement")); } public static Iterable<SNode> sourceNodesQuery_3240099288359312157(final SourceSubstituteMacroNodesContext _context) { return ListSequence.fromList(SModelOperations.roots(_context.getInputModel(), MetaAdapterFactory.getConcept(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, "jetbrains.mps.lang.textGen.structure.ConceptTextGenDeclaration"))).where(new IWhereFilter<SNode>() { public boolean accept(SNode it) { return (boolean) ConceptTextGenDeclaration__BehaviorDescriptor.shallProduceOutputUnit_id3fG6dkhfrk3.invoke(it); } }); } public static Iterable<SNode> sourceNodesQuery_5234914442344905187(final SourceSubstituteMacroNodesContext _context) { return SLinkOperations.getChildren(SLinkOperations.getTarget(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x6ee6b5c5ad5f7279L, "extension")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x108bbca0f48L, 0x108bbd29b4aL, "body")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b200L, 0xf8cc6bf961L, "statement")); } public static Iterable<SNode> sourceNodesQuery_5234914442344905202(final SourceSubstituteMacroNodesContext _context) { return ListSequence.fromList(SModelOperations.roots(_context.getInputModel(), MetaAdapterFactory.getConcept(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, "jetbrains.mps.lang.textGen.structure.ConceptTextGenDeclaration"))).where(new IWhereFilter<SNode>() { public boolean accept(SNode it) { return (boolean) ConceptTextGenDeclaration__BehaviorDescriptor.shallProduceOutputUnit_id3fG6dkhfrk3.invoke(it); } }); } public static Iterable<SNode> sourceNodesQuery_8098116031886467914(final SourceSubstituteMacroNodesContext _context) { return ListSequence.fromList(SModelOperations.roots(_context.getInputModel(), MetaAdapterFactory.getConcept(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, "jetbrains.mps.lang.textGen.structure.ConceptTextGenDeclaration"))).where(new IWhereFilter<SNode>() { public boolean accept(SNode it) { return (boolean) ConceptTextGenDeclaration__BehaviorDescriptor.shallProduceOutputUnit_id3fG6dkhfrk3.invoke(it) && SNodeOperations.isInstanceOf(SLinkOperations.getTarget(it, MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x10fd02ec599e8fbeL, "encoding")), MetaAdapterFactory.getConcept(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x63754d97e1c86b8cL, "jetbrains.mps.lang.textGen.structure.EncodingLiteral")); } }); } public static Iterable<SNode> sourceNodesQuery_8098116031886550296(final SourceSubstituteMacroNodesContext _context) { return SLinkOperations.getChildren(SLinkOperations.getTarget(SNodeOperations.as(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x10fd02ec599e8fbeL, "encoding")), MetaAdapterFactory.getConcept(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x10fd02ec599e8f93L, "jetbrains.mps.lang.textGen.structure.EncodingDeclaration")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x108bbca0f48L, 0x108bbd29b4aL, "body")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b200L, 0xf8cc6bf961L, "statement")); } public static Iterable<SNode> sourceNodesQuery_8098116031886539681(final SourceSubstituteMacroNodesContext _context) { return ListSequence.fromList(SModelOperations.roots(_context.getInputModel(), MetaAdapterFactory.getConcept(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, "jetbrains.mps.lang.textGen.structure.ConceptTextGenDeclaration"))).where(new IWhereFilter<SNode>() { public boolean accept(SNode it) { return (boolean) ConceptTextGenDeclaration__BehaviorDescriptor.shallProduceOutputUnit_id3fG6dkhfrk3.invoke(it) && SNodeOperations.isInstanceOf(SLinkOperations.getTarget(it, MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x10fd02ec599e8fbeL, "encoding")), MetaAdapterFactory.getConcept(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x10fd02ec599e8f93L, "jetbrains.mps.lang.textGen.structure.EncodingDeclaration")); } }); } public static Iterable<SNode> sourceNodesQuery_998325320688459534(final SourceSubstituteMacroNodesContext _context) { return SLinkOperations.getChildren(SLinkOperations.getTarget(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x2bad879ac8f27decL, "layout")), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x2bad879ac8f27dc9L, 0x2bad879ac8f27dcbL, "parts")); } public static Iterable<SNode> sourceNodesQuery_2170558324036667470(final SourceSubstituteMacroNodesContext _context) { return SLinkOperations.collect(SLinkOperations.getChildren(_context.getNode(), MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x1dfcc3c672ea7620L, "contextObjects")), MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x1dfcc3c672ea762cL, 0x1dfcc3c672ea762dL, "context")); } public static Iterable<SNode> sourceNodesQuery_998325320688382589(final SourceSubstituteMacroNodesContext _context) { return ListSequence.fromList(SModelOperations.roots(_context.getInputModel(), MetaAdapterFactory.getConcept(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, "jetbrains.mps.lang.textGen.structure.ConceptTextGenDeclaration"))).where(new IWhereFilter<SNode>() { public boolean accept(SNode it) { return (boolean) ConceptTextGenDeclaration__BehaviorDescriptor.shallProduceOutputUnit_id3fG6dkhfrk3.invoke(it) && (boolean) ConceptTextGenDeclaration__BehaviorDescriptor.needsUnitConfigure_id1SvnOIGt_fM.invoke(it); } }); } public static Object insertMacro_varValue_7832257118928381077(final TemplateVarContext _context) { return _context.getNode(); } public static Object insertMacro_varValue_9221686591909468720(final TemplateVarContext _context) { List<SNode> r = SModelOperations.roots(_context.getInputModel(), MetaAdapterFactory.getConcept(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, "jetbrains.mps.lang.textGen.structure.ConceptTextGenDeclaration")); return ListSequence.fromList(r).where(new IWhereFilter<SNode>() { public boolean accept(SNode it) { return (SLinkOperations.getTarget(it, MetaAdapterFactory.getContainmentLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x11f41304578L, "textGenBlock")) != null); } }).sort(new ISelector<SNode, String>() { public String select(SNode it) { return SPropertyOperations.getString(SLinkOperations.getTarget(it, MetaAdapterFactory.getReferenceLink(0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f3c776369L, 0x11f3c7a3d4dL, "conceptDeclaration")), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")); } }, true).toListSequence(); } private final Map<String, ReductionRuleCondition> rrcMethods = new HashMap<String, ReductionRuleCondition>(); { int i = 0; rrcMethods.put("1235572176667", new QueriesGenerated.RRC(i++)); rrcMethods.put("663595348025645459", new QueriesGenerated.RRC(i++)); rrcMethods.put("1570228009929814969", new QueriesGenerated.RRC(i++)); rrcMethods.put("2170558324034357301", 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_663595348025639958(ctx); case 1: return QueriesGenerated.baseMappingRule_Condition_663595348025645461(ctx); case 2: return QueriesGenerated.baseMappingRule_Condition_1570228009929814973(ctx); case 3: return QueriesGenerated.baseMappingRule_Condition_2170558324035943543(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, MapRootRuleCondition> mrrcMethods = new HashMap<String, MapRootRuleCondition>(); { int i = 0; mrrcMethods.put("1233766602409", new QueriesGenerated.MRRC(i++)); } @Override @NotNull public MapRootRuleCondition getMapRootRuleCondition(@NotNull QueryKey identity) { final String id = identity.getTemplateNode().getNodeId().toString(); if (!(mrrcMethods.containsKey(id))) { return super.getMapRootRuleCondition(identity); } return mrrcMethods.get(id); } private static class MRRC implements MapRootRuleCondition { private final int methodKey; public MRRC(int methodKey) { this.methodKey = methodKey; } @Override public boolean check(@NotNull MapRootRuleContext ctx) throws GenerationFailureException { switch (methodKey) { case 0: return QueriesGenerated.baseMappingRule_Condition_3741392693833960322(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("9221686591909406114", 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_9221686591909407403(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("4710719082912997766", new QueriesGenerated.SNQ(i++)); snqMethods.put("2170558324034357315", new QueriesGenerated.SNQ(i++)); snqMethods.put("2170558324034351897", new QueriesGenerated.SNQ(i++)); snqMethods.put("8958762413370113782", new QueriesGenerated.SNQ(i++)); snqMethods.put("4710719082913202717", new QueriesGenerated.SNQ(i++)); snqMethods.put("3135747254706218420", new QueriesGenerated.SNQ(i++)); snqMethods.put("4710719082913181675", new QueriesGenerated.SNQ(i++)); snqMethods.put("4710719082913183642", new QueriesGenerated.SNQ(i++)); snqMethods.put("4710719082913298096", new QueriesGenerated.SNQ(i++)); snqMethods.put("998325320688504218", new QueriesGenerated.SNQ(i++)); snqMethods.put("7832257118928369557", 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_4710719082912997766(ctx); case 1: return QueriesGenerated.sourceNodeQuery_2170558324034357315(ctx); case 2: return QueriesGenerated.sourceNodeQuery_2170558324034351897(ctx); case 3: return QueriesGenerated.sourceNodeQuery_8958762413370113782(ctx); case 4: return QueriesGenerated.sourceNodeQuery_4710719082913202717(ctx); case 5: return QueriesGenerated.sourceNodeQuery_3135747254706218420(ctx); case 6: return QueriesGenerated.sourceNodeQuery_4710719082913181675(ctx); case 7: return QueriesGenerated.sourceNodeQuery_4710719082913183642(ctx); case 8: return QueriesGenerated.sourceNodeQuery_4710719082913298096(ctx); case 9: return QueriesGenerated.sourceNodeQuery_998325320688504218(ctx); case 10: return QueriesGenerated.sourceNodeQuery_7832257118928369557(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("1237473086491", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("4710719082913003825", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("4710719082913003836", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("4710719082913003845", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("4710719082912997756", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("4710719082912997776", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("4710719082912997792", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("2170558324034351308", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("1237216160530", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("1237213172348", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("1237470011010", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("4710719082913287761", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("7832257118928381083", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("7106796582841120204", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("8255719797765085441", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("3240099288359323739", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("3240099288359312157", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("5234914442344905187", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("5234914442344905202", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("8098116031886467914", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("8098116031886550296", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("8098116031886539681", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("998325320688459534", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("2170558324036667470", new QueriesGenerated.SNsQ(i++)); snsqMethods.put("998325320688382589", 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_1237473086491(ctx)); case 1: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_4710719082913003825(ctx)); case 2: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_4710719082913003836(ctx)); case 3: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_4710719082913003845(ctx)); case 4: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_4710719082912997756(ctx)); case 5: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_4710719082912997776(ctx)); case 6: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_4710719082912997792(ctx)); case 7: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_2170558324034351308(ctx)); case 8: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_1237216160530(ctx)); case 9: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_1237213172348(ctx)); case 10: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_1237470011010(ctx)); case 11: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_4710719082913287761(ctx)); case 12: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_7832257118928381083(ctx)); case 13: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_7106796582841120204(ctx)); case 14: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_8255719797765085441(ctx)); case 15: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_3240099288359323739(ctx)); case 16: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_3240099288359312157(ctx)); case 17: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_5234914442344905187(ctx)); case 18: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_5234914442344905202(ctx)); case 19: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_8098116031886467914(ctx)); case 20: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_8098116031886550296(ctx)); case 21: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_8098116031886539681(ctx)); case 22: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_998325320688459534(ctx)); case 23: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_2170558324036667470(ctx)); case 24: return IterableUtil.asCollection(QueriesGenerated.sourceNodesQuery_998325320688382589(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("1233679994383", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "TextGenDescriptorClass")); pvqMethods.put("1233930145390", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "LangTextGen")); pvqMethods.put("1237212089066", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x1118e558c6dL, 0x1118e56212bL, "fqClassName"), "extendedTextGen")); pvqMethods.put("4710719082913003851", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "operationName")); pvqMethods.put("4710719082912997784", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "functionName")); pvqMethods.put("2170558324036319289", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "contextObjectInstance")); pvqMethods.put("1237216130331", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x1115749abe3L, 0x1115767a8eeL, "fqClassName"), "class")); pvqMethods.put("1237216146976", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x1115749abe3L, 0x111576710b3L, "methodName"), "staticMethod")); pvqMethods.put("1237213172355", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x1115749abe3L, 0x111576710b3L, "methodName"), "method")); pvqMethods.put("1237213172364", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x1115749abe3L, 0x1115767a8eeL, "fqClassName"), "class")); pvqMethods.put("4710719082913170837", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf93d565d10L, 0xf93d565d11L, "value"), "")); pvqMethods.put("4710719082913183684", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf93d565d10L, 0xf93d565d11L, "value"), "separator")); pvqMethods.put("998325320688484712", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf93d565d10L, 0xf93d565d11L, "value"), null)); pvqMethods.put("1697917907977178165", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf93d565d10L, 0xf93d565d11L, "value"), "")); pvqMethods.put("7106796582840914992", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x1118e558c6dL, 0x1118e56212bL, "fqClassName"), "LanguageConceptSwitch")); pvqMethods.put("7106796582840974705", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0xf46f1c42ee50930L, 0xf46f1c42ee50932L, "fqClassName"), "LanguageConceptSwitch")); pvqMethods.put("7106796582841111310", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x11157912ec1L, 0x11157952fb6L, "fieldName"), "CONCEPT")); pvqMethods.put("7106796582841111991", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xdf345b11b8c74213L, 0xac6648d2a9b75d88L, 0x11157912ec1L, 0x1115794e9f1L, "fqClassName"), "LanguageConceptSwitch")); pvqMethods.put("3240099288359334172", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "getFilename")); pvqMethods.put("5234914442344905230", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "getExtension")); pvqMethods.put("8098116031886524629", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf93d565d10L, 0xf93d565d11L, "value"), "")); pvqMethods.put("8098116031886806271", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "getEncoding")); pvqMethods.put("8098116031886827487", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "getEncoding")); pvqMethods.put("2170558324036671924", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf93d565d10L, 0xf93d565d11L, "value"), null)); pvqMethods.put("998325320688382607", new QueriesGenerated.PVQ(i++, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"), "createTextUnit")); } @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_1233679994384(ctx); case 1: return QueriesGenerated.propertyMacro_GetPropertyValue_1233930145391(ctx); case 2: return QueriesGenerated.propertyMacro_GetPropertyValue_1237212089067(ctx); case 3: return QueriesGenerated.propertyMacro_GetPropertyValue_4710719082913003852(ctx); case 4: return QueriesGenerated.propertyMacro_GetPropertyValue_4710719082912997785(ctx); case 5: return QueriesGenerated.propertyMacro_GetPropertyValue_2170558324036319290(ctx); case 6: return QueriesGenerated.propertyMacro_GetPropertyValue_1237216130332(ctx); case 7: return QueriesGenerated.propertyMacro_GetPropertyValue_1237216146977(ctx); case 8: return QueriesGenerated.propertyMacro_GetPropertyValue_1237213172356(ctx); case 9: return QueriesGenerated.propertyMacro_GetPropertyValue_1237213172365(ctx); case 10: return QueriesGenerated.propertyMacro_GetPropertyValue_4710719082913170838(ctx); case 11: return QueriesGenerated.propertyMacro_GetPropertyValue_4710719082913183685(ctx); case 12: return QueriesGenerated.propertyMacro_GetPropertyValue_998325320688484713(ctx); case 13: return QueriesGenerated.propertyMacro_GetPropertyValue_1697917907977178166(ctx); case 14: return QueriesGenerated.propertyMacro_GetPropertyValue_7106796582840914993(ctx); case 15: return QueriesGenerated.propertyMacro_GetPropertyValue_7106796582840974706(ctx); case 16: return QueriesGenerated.propertyMacro_GetPropertyValue_7106796582841111311(ctx); case 17: return QueriesGenerated.propertyMacro_GetPropertyValue_7106796582841111992(ctx); case 18: return QueriesGenerated.propertyMacro_GetPropertyValue_3240099288359334173(ctx); case 19: return QueriesGenerated.propertyMacro_GetPropertyValue_5234914442344905231(ctx); case 20: return QueriesGenerated.propertyMacro_GetPropertyValue_8098116031886524630(ctx); case 21: return QueriesGenerated.propertyMacro_GetPropertyValue_8098116031886806272(ctx); case 22: return QueriesGenerated.propertyMacro_GetPropertyValue_8098116031886827488(ctx); case 23: return QueriesGenerated.propertyMacro_GetPropertyValue_2170558324036671925(ctx); case 24: return QueriesGenerated.propertyMacro_GetPropertyValue_998325320688382608(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("274316186079995489", new QueriesGenerated.IfMC(i++)); imcMethods.put("274316186080011602", new QueriesGenerated.IfMC(i++)); imcMethods.put("274316186080025108", new QueriesGenerated.IfMC(i++)); imcMethods.put("274316186080061491", new QueriesGenerated.IfMC(i++)); imcMethods.put("274316186080085198", new QueriesGenerated.IfMC(i++)); imcMethods.put("274316186080110425", new QueriesGenerated.IfMC(i++)); imcMethods.put("3101153546911107995", new QueriesGenerated.IfMC(i++)); imcMethods.put("1237214781942", new QueriesGenerated.IfMC(i++)); imcMethods.put("4710719082913305447", new QueriesGenerated.IfMC(i++)); imcMethods.put("1408971595082527140", new QueriesGenerated.IfMC(i++)); imcMethods.put("4710719082913199464", new QueriesGenerated.IfMC(i++)); imcMethods.put("3135747254706207522", new QueriesGenerated.IfMC(i++)); imcMethods.put("3135747254706212714", new QueriesGenerated.IfMC(i++)); imcMethods.put("4710719082913168503", new QueriesGenerated.IfMC(i++)); imcMethods.put("4710719082913181826", new QueriesGenerated.IfMC(i++)); imcMethods.put("4710719082913298086", new QueriesGenerated.IfMC(i++)); imcMethods.put("8098116031886749452", new QueriesGenerated.IfMC(i++)); imcMethods.put("8098116031886781584", new QueriesGenerated.IfMC(i++)); imcMethods.put("998325320688366202", new QueriesGenerated.IfMC(i++)); imcMethods.put("998325320688500462", new QueriesGenerated.IfMC(i++)); imcMethods.put("7832257118928478524", new QueriesGenerated.IfMC(i++)); imcMethods.put("7106796582841423810", new QueriesGenerated.IfMC(i++)); imcMethods.put("3240099288359315174", new QueriesGenerated.IfMC(i++)); imcMethods.put("5234914442344905175", new QueriesGenerated.IfMC(i++)); imcMethods.put("2170558324036772382", new QueriesGenerated.IfMC(i++)); imcMethods.put("998325320688469459", new QueriesGenerated.IfMC(i++)); imcMethods.put("8098116031886688664", new QueriesGenerated.IfMC(i++)); imcMethods.put("8098116031886667017", new QueriesGenerated.IfMC(i++)); imcMethods.put("2170558324036796286", 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_274316186079995491(ctx); case 1: return QueriesGenerated.ifMacro_Condition_274316186080011604(ctx); case 2: return QueriesGenerated.ifMacro_Condition_274316186080025110(ctx); case 3: return QueriesGenerated.ifMacro_Condition_274316186080061493(ctx); case 4: return QueriesGenerated.ifMacro_Condition_274316186080085200(ctx); case 5: return QueriesGenerated.ifMacro_Condition_274316186080110427(ctx); case 6: return QueriesGenerated.ifMacro_Condition_3101153546911107996(ctx); case 7: return QueriesGenerated.ifMacro_Condition_1237214781943(ctx); case 8: return QueriesGenerated.ifMacro_Condition_4710719082913305450(ctx); case 9: return QueriesGenerated.ifMacro_Condition_1408971595082527143(ctx); case 10: return QueriesGenerated.ifMacro_Condition_4710719082913199467(ctx); case 11: return QueriesGenerated.ifMacro_Condition_3135747254706207524(ctx); case 12: return QueriesGenerated.ifMacro_Condition_3135747254706212715(ctx); case 13: return QueriesGenerated.ifMacro_Condition_4710719082913168506(ctx); case 14: return QueriesGenerated.ifMacro_Condition_4710719082913181829(ctx); case 15: return QueriesGenerated.ifMacro_Condition_4710719082913298087(ctx); case 16: return QueriesGenerated.ifMacro_Condition_8098116031886749454(ctx); case 17: return QueriesGenerated.ifMacro_Condition_8098116031886781586(ctx); case 18: return QueriesGenerated.ifMacro_Condition_998325320688366204(ctx); case 19: return QueriesGenerated.ifMacro_Condition_998325320688500464(ctx); case 20: return QueriesGenerated.ifMacro_Condition_7832257118928478526(ctx); case 21: return QueriesGenerated.ifMacro_Condition_7106796582841423812(ctx); case 22: return QueriesGenerated.ifMacro_Condition_3240099288359315176(ctx); case 23: return QueriesGenerated.ifMacro_Condition_5234914442344905176(ctx); case 24: return QueriesGenerated.ifMacro_Condition_2170558324036772384(ctx); case 25: return QueriesGenerated.ifMacro_Condition_998325320688469461(ctx); case 26: return QueriesGenerated.ifMacro_Condition_8098116031886688666(ctx); case 27: return QueriesGenerated.ifMacro_Condition_8098116031886667019(ctx); case 28: return QueriesGenerated.ifMacro_Condition_2170558324036796288(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("7832257118928273453", new QueriesGenerated.RTQ(0, "getFilename")); rtqMethods.put("7832257118928275274", new QueriesGenerated.RTQ(1, "getExtension")); rtqMethods.put("8098116031886788391", new QueriesGenerated.RTQ(2, "getEncoding")); rtqMethods.put("7832257118928276828", new QueriesGenerated.RTQ(3, "createTextUnit")); rtqMethods.put("4147950839246952263", new QueriesGenerated.RTQ(4, "TextGenAspectDescriptor")); rtqMethods.put("2170558324036126544", new QueriesGenerated.RTQ(5, "Object")); rtqMethods.put("2170558324035932092", new QueriesGenerated.RTQ(6, "Object")); rtqMethods.put("1697917907977190733", new QueriesGenerated.RTQ(7, "A")); rtqMethods.put("7106796582841250422", new QueriesGenerated.RTQ(8, "TextGenDescriptorClass")); rtqMethods.put("8255719797765085433", new QueriesGenerated.RTQ(9, "BaseConcept")); rtqMethods.put("2170558324037477104", new QueriesGenerated.RTQ(10, "LangTextGen")); } @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_7832257118928273454(ctx); case 1: return QueriesGenerated.referenceMacro_GetReferent_7832257118928275275(ctx); case 2: return QueriesGenerated.referenceMacro_GetReferent_8098116031886788392(ctx); case 3: return QueriesGenerated.referenceMacro_GetReferent_7832257118928276829(ctx); case 4: return QueriesGenerated.referenceMacro_GetReferent_4147950839246952264(ctx); case 5: return QueriesGenerated.referenceMacro_GetReferent_2170558324036126545(ctx); case 6: return QueriesGenerated.referenceMacro_GetReferent_2170558324035932093(ctx); case 7: return QueriesGenerated.referenceMacro_GetReferent_1697917907977190736(ctx); case 8: return QueriesGenerated.referenceMacro_GetReferent_7106796582841250423(ctx); case 9: return QueriesGenerated.referenceMacro_GetReferent_8255719797765085434(ctx); case 10: return QueriesGenerated.referenceMacro_GetReferent_2170558324037477105(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("7832257118928381076", new QueriesGenerated.VVQ(0)); vvqMethods.put("9221686591909468718", new QueriesGenerated.VVQ(1)); } @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_7832257118928381077(ctx); case 1: return QueriesGenerated.insertMacro_varValue_9221686591909468720(ctx); default: throw new GenerationFailureException(String.format("Inconsistent QueriesGenerated: there's no method for query %s (key: #%d)", ctx.getTemplateReference(), methodKey)); } } } private static boolean eq_x583g4_a0a0a0a0a0a0a5a6(Object a, Object b) { return (a != null ? a.equals(b) : a == b); } private static SNode _quotation_createNode_x583g4_a0a0a0a0a0f0g() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x101de48bf9eL, "ClassifierType"), null, null, false); quotedNode_1.setReference(MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101de48bf9eL, 0x101de490babL, "classifier"), SReference.create(MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101de48bf9eL, 0x101de490babL, "classifier"), quotedNode_1, facade.createModelReference("8865b7a8-5271-43d3-884c-6fd1d9cfdd34/java:org.jetbrains.mps.openapi.model(MPS.OpenAPI/)"), facade.createNodeId("~SNode"))); return quotedNode_1; } private static SNode _quotation_createNode_x583g4_b0a0a25() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x11d47da71ecL, "StringType"), null, null, false); return quotedNode_1; } }