public boolean match(SNode nodeToMatch) {
   {
     SNode nodeToMatch_nlist_subtypeOf_list_of_nodes_3tjcdg_a0a_0;
     nodeToMatch_nlist_subtypeOf_list_of_nodes_3tjcdg_a0a_0 = nodeToMatch;
     if (!("jetbrains.mps.baseLanguage.collections.structure.ListType"
         .equals(
             nodeToMatch_nlist_subtypeOf_list_of_nodes_3tjcdg_a0a_0
                 .getConcept()
                 .getConceptId()))) {
       return false;
     }
     {
       String childRole_nlist_subtypeOf_list_of_nodes_3tjcdg_ = "elementType";
       if (!(PatternUtil.hasNChildren(
           nodeToMatch_nlist_subtypeOf_list_of_nodes_3tjcdg_a0a_0,
           childRole_nlist_subtypeOf_list_of_nodes_3tjcdg_,
           1))) {
         return false;
       }
       {
         SNode childVar_nlist_subtypeOf_list_of_nodes_3tjcdg_a0a0 =
             IterableUtil.get(
                 nodeToMatch_nlist_subtypeOf_list_of_nodes_3tjcdg_a0a_0.getChildren(
                     childRole_nlist_subtypeOf_list_of_nodes_3tjcdg_),
                 0);
         this.patternVar_ELEMENT = childVar_nlist_subtypeOf_list_of_nodes_3tjcdg_a0a0;
       }
     }
   }
   return true;
 }
Exemplo n.º 2
0
 public boolean match(SNode nodeToMatch) {
   {
     SNode nodeToMatch_7fbm30_a1a0a0 = nodeToMatch;
     if (!("jetbrains.mps.baseLanguage.structure.NotEqualsExpression"
         .equals(nodeToMatch_7fbm30_a1a0a0.getConcept().getQualifiedName()))) {
       return false;
     }
     {
       String childRole_7fbm30__2 = "leftExpression";
       if (!(PatternUtil.hasNChildren(nodeToMatch_7fbm30_a1a0a0, childRole_7fbm30__2, 1))) {
         return false;
       }
       {
         SNode childVar_7fbm30_a0b0a0a =
             IterableUtil.get(nodeToMatch_7fbm30_a1a0a0.getChildren(childRole_7fbm30__2), 0);
         {
           SNode nodeToMatch_7fbm30_a0b0a0a = childVar_7fbm30_a0b0a0a;
           if (!("jetbrains.mps.baseLanguage.structure.NullLiteral"
               .equals(nodeToMatch_7fbm30_a0b0a0a.getConcept().getQualifiedName()))) {
             return false;
           }
         }
       }
     }
     {
       String childRole_7fbm30__3 = "rightExpression";
       if (!(PatternUtil.hasNChildren(nodeToMatch_7fbm30_a1a0a0, childRole_7fbm30__3, 1))) {
         return false;
       }
       {
         SNode childVar_7fbm30_a0b0a0a_0 =
             IterableUtil.get(nodeToMatch_7fbm30_a1a0a0.getChildren(childRole_7fbm30__3), 0);
         {
           SNode nodeToMatch_7fbm30_a0b0a0a_0 = childVar_7fbm30_a0b0a0a_0;
           patternVar_p = nodeToMatch_7fbm30_a0b0a0a_0;
         }
       }
     }
   }
   return true;
 }
Exemplo n.º 3
0
 public boolean match(SNode nodeToMatch) {
   {
     SNode nodeToMatch_7fbm30_a0a = nodeToMatch;
     if (!("jetbrains.mps.baseLanguage.structure.AssertStatement"
         .equals(nodeToMatch_7fbm30_a0a.getConcept().getQualifiedName()))) {
       return false;
     }
     {
       String childRole_7fbm30_ = "condition";
       if (!(PatternUtil.hasNChildren(nodeToMatch_7fbm30_a0a, childRole_7fbm30_, 1))) {
         return false;
       }
       {
         SNode childVar_7fbm30_a0a0 =
             IterableUtil.get(nodeToMatch_7fbm30_a0a.getChildren(childRole_7fbm30_), 0);
         {
           SNode nodeToMatch_7fbm30_a0a0 = childVar_7fbm30_a0a0;
           {
             boolean orMatches = false;
             GeneratedMatchingPattern orPattern;
             orPattern =
                 new RuleAssertNotNull.Pattern_7fbm30_a0a
                     .Pattern_7fbm30_a0a0a2a1a1a1a1a0a1a1a0a0a0a();
             if (orPattern.match(nodeToMatch_7fbm30_a0a0)) {
               orMatches = true;
               myOrPattern_7fbm30_a0a0 = orPattern;
             }
             orPattern =
                 new RuleAssertNotNull.Pattern_7fbm30_a0a
                     .Pattern_7fbm30_a0a0a3a1a1a1a1a0a1a1a0a0a0a();
             if (orPattern.match(nodeToMatch_7fbm30_a0a0)) {
               orMatches = true;
               myOrPattern_7fbm30_a0a0 = orPattern;
             }
             if (!(orMatches)) {
               return false;
             }
           }
         }
         this.patternVar_action_var_5730083271929373007 = childVar_7fbm30_a0a0;
       }
     }
   }
   return true;
 }
 public boolean match(SNode nodeToMatch) {
   {
     SNode nodeToMatch_6isygg_a0a0a0 = nodeToMatch;
     if (!(MetaAdapterFactory.getConcept(
             0xf3061a5392264cc5L,
             0xa443f952ceaf5816L,
             0x101de48bf9eL,
             "jetbrains.mps.baseLanguage.structure.ClassifierType")
         .equals(nodeToMatch_6isygg_a0a0a0.getConcept()))) {
       return false;
     }
     {
       SNodeReference pointer = SNODE_POINTER_w1n2qe_a0a0a0a0b0b0a0b0a0a0a0c7;
       if (!(PatternUtil.matchReferentWithNode(
           pointer,
           nodeToMatch_6isygg_a0a0a0.getReferenceTarget(
               MetaAdapterFactory.getReferenceLink(
                   0xf3061a5392264cc5L,
                   0xa443f952ceaf5816L,
                   0x101de48bf9eL,
                   0x101de490babL,
                   "classifier"))))) {
         return false;
       }
     }
     {
       SContainmentLink childRole_6isygg_ =
           MetaAdapterFactory.getContainmentLink(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0x101de48bf9eL,
               0x102419671abL,
               "parameter");
       if (!(PatternUtil.hasNChildren(nodeToMatch_6isygg_a0a0a0, childRole_6isygg_, 1))) {
         return false;
       }
       {
         SNode childVar_6isygg_a0a0a0a =
             IterableUtil.get(nodeToMatch_6isygg_a0a0a0.getChildren(childRole_6isygg_), 0);
         this.patternVar_elem = childVar_6isygg_a0a0a0a;
       }
     }
   }
   return true;
 }
 public boolean match(SNode nodeToMatch) {
   {
     SNode nodeToMatch_twopzc_a0a = nodeToMatch;
     if (!("jetbrains.mps.baseLanguage.collections.structure.SetType"
         .equals(nodeToMatch_twopzc_a0a.getConcept().getQualifiedName()))) {
       return false;
     }
     {
       String childRole_twopzc_ = "elementType";
       if (!(PatternUtil.hasNChildren(nodeToMatch_twopzc_a0a, childRole_twopzc_, 1))) {
         return false;
       }
       {
         SNode childVar_twopzc_a0a0 =
             IterableUtil.get(nodeToMatch_twopzc_a0a.getChildren(childRole_twopzc_), 0);
         this.patternVar_elementType = childVar_twopzc_a0a0;
       }
     }
   }
   return true;
 }
 public boolean match(SNode nodeToMatch) {
   {
     SNode nodeToMatch_supertypesOf_ClassifierType_Collection_g8re64_a0a;
     nodeToMatch_supertypesOf_ClassifierType_Collection_g8re64_a0a = nodeToMatch;
     if (!("jetbrains.mps.baseLanguage.structure.ClassifierType"
         .equals(
             nodeToMatch_supertypesOf_ClassifierType_Collection_g8re64_a0a
                 .getConcept()
                 .getId()))) {
       return false;
     }
     {
       SNodePointer pointer = SNODE_POINTER_832k9i_a0a0a0a0b0c0a0a0a0a0a0c;
       if (!(PatternUtil.matchReferentWithNode(
           pointer,
           nodeToMatch_supertypesOf_ClassifierType_Collection_g8re64_a0a.getReferenceTarget(
               "classifier")))) {
         return false;
       }
     }
     {
       String childRole_supertypesOf_ClassifierType_Collection_g8re64_ = "parameter";
       if (!(PatternUtil.hasNChildren(
           nodeToMatch_supertypesOf_ClassifierType_Collection_g8re64_a0a,
           childRole_supertypesOf_ClassifierType_Collection_g8re64_,
           1))) {
         return false;
       }
       {
         SNode childVar_supertypesOf_ClassifierType_Collection_g8re64_a0a0 =
             nodeToMatch_supertypesOf_ClassifierType_Collection_g8re64_a0a
                 .getChildren(childRole_supertypesOf_ClassifierType_Collection_g8re64_)
                 .get(0);
         this.patternVar_ELEMENT = childVar_supertypesOf_ClassifierType_Collection_g8re64_a0a0;
       }
     }
   }
   return true;
 }
Exemplo n.º 7
0
 public boolean match(SNode nodeToMatch) {
   {
     SNode nodeToMatch_x583g4_a0a0a78 = nodeToMatch;
     if (!("jetbrains.mps.core.xml.structure.XmlElement"
         .equals(nodeToMatch_x583g4_a0a0a78.getConcept().getQualifiedName()))) {
       return false;
     }
     if (!("classpath"
         .equals(SNodeAccessUtil.getProperty(nodeToMatch_x583g4_a0a0a78, "tagName")))) {
       return false;
     }
     {
       String childRole_x583g4__5 = "content";
       if (!(PatternUtil.hasNChildren(nodeToMatch_x583g4_a0a0a78, childRole_x583g4__5, 1))) {
         return false;
       }
       {
         SNode childVar_x583g4_a0a0a0jd =
             IterableUtil.get(nodeToMatch_x583g4_a0a0a78.getChildren(childRole_x583g4__5), 0);
         {
           SNode nodeToMatch_x583g4_a0a0a0jd = childVar_x583g4_a0a0a0jd;
           if (!("jetbrains.mps.core.xml.structure.XmlElement"
               .equals(nodeToMatch_x583g4_a0a0a0jd.getConcept().getQualifiedName()))) {
             return false;
           }
           if (!("true"
               .equals(
                   SNodeAccessUtil.getProperty(
                       nodeToMatch_x583g4_a0a0a0jd, "shortEmptyNotation")))) {
             return false;
           }
           if (!("pathelement"
               .equals(SNodeAccessUtil.getProperty(nodeToMatch_x583g4_a0a0a0jd, "tagName")))) {
             return false;
           }
           {
             String childRole_x583g4__6 = "attributes";
             if (!(PatternUtil.hasNChildren(
                 nodeToMatch_x583g4_a0a0a0jd, childRole_x583g4__6, 1))) {
               return false;
             }
             {
               SNode childVar_x583g4_a0a0a0a78 =
                   IterableUtil.get(
                       nodeToMatch_x583g4_a0a0a0jd.getChildren(childRole_x583g4__6), 0);
               {
                 SNode nodeToMatch_x583g4_a0a0a0a78 = childVar_x583g4_a0a0a0a78;
                 if (!("jetbrains.mps.core.xml.structure.XmlAttribute"
                     .equals(nodeToMatch_x583g4_a0a0a0a78.getConcept().getQualifiedName()))) {
                   return false;
                 }
                 if (!("path"
                     .equals(
                         SNodeAccessUtil.getProperty(
                             nodeToMatch_x583g4_a0a0a0a78, "attrName")))) {
                   return false;
                 }
                 {
                   String childRole_x583g4__7 = "value";
                   if (!(PatternUtil.hasNChildren(
                       nodeToMatch_x583g4_a0a0a0a78, childRole_x583g4__7, 1))) {
                     return false;
                   }
                   {
                     SNode childVar_x583g4_a0a0a0a0jd =
                         IterableUtil.get(
                             nodeToMatch_x583g4_a0a0a0a78.getChildren(childRole_x583g4__7), 0);
                     this.patternVar_pathvalue = childVar_x583g4_a0a0a0a0jd;
                   }
                 }
               }
             }
           }
         }
       }
     }
   }
   return true;
 }
Exemplo n.º 8
0
 public boolean match(SNode nodeToMatch) {
   {
     SNode nodeToMatch_xihehy_a0a1a2c = nodeToMatch;
     if (!(MetaAdapterFactory.getConcept(
             0xf3061a5392264cc5L,
             0xa443f952ceaf5816L,
             0x116b46a08c4L,
             "jetbrains.mps.baseLanguage.structure.DotExpression")
         .equals(nodeToMatch_xihehy_a0a1a2c.getConcept()))) {
       return false;
     }
     {
       SContainmentLink childRole_xihehy_ =
           MetaAdapterFactory.getContainmentLink(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0x116b46a08c4L,
               0x116b46a4416L,
               "operand");
       if (!(PatternUtil.hasNChildren(nodeToMatch_xihehy_a0a1a2c, childRole_xihehy_, 1))) {
         return false;
       }
       {
         SNode childVar_xihehy_a0a0b0c2 =
             IterableUtil.get(nodeToMatch_xihehy_a0a1a2c.getChildren(childRole_xihehy_), 0);
         {
           SNode nodeToMatch_xihehy_a0a0b0c2 = childVar_xihehy_a0a0b0c2;
           if (!(MetaAdapterFactory.getConcept(
                   0xf3061a5392264cc5L,
                   0xa443f952ceaf5816L,
                   0xf940c80846L,
                   "jetbrains.mps.baseLanguage.structure.StaticFieldReference")
               .equals(nodeToMatch_xihehy_a0a0b0c2.getConcept()))) {
             return false;
           }
           patternVar_className =
               nodeToMatch_xihehy_a0a0b0c2.getReferenceTarget(
                   MetaAdapterFactory.getReferenceLink(
                       0xf3061a5392264cc5L,
                       0xa443f952ceaf5816L,
                       0xf940c80846L,
                       0x10a75869f9bL,
                       "classifier"));
           patternVar_field =
               nodeToMatch_xihehy_a0a0b0c2.getReferenceTarget(
                   MetaAdapterFactory.getReferenceLink(
                       0xf3061a5392264cc5L,
                       0xa443f952ceaf5816L,
                       0xf8c77f1e98L,
                       0xf8cc6bf960L,
                       "variableDeclaration"));
         }
       }
     }
     {
       SContainmentLink childRole_xihehy__0 =
           MetaAdapterFactory.getContainmentLink(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0x116b46a08c4L,
               0x116b46b36c4L,
               "operation");
       if (!(PatternUtil.hasNChildren(nodeToMatch_xihehy_a0a1a2c, childRole_xihehy__0, 1))) {
         return false;
       }
       {
         SNode childVar_xihehy_a0a0b0c2_0 =
             IterableUtil.get(nodeToMatch_xihehy_a0a1a2c.getChildren(childRole_xihehy__0), 0);
         {
           SNode nodeToMatch_xihehy_a0a0b0c2_0 = childVar_xihehy_a0a0b0c2_0;
           if (!(MetaAdapterFactory.getConcept(
                   0xf3061a5392264cc5L,
                   0xa443f952ceaf5816L,
                   0x118154a6332L,
                   "jetbrains.mps.baseLanguage.structure.InstanceMethodCallOperation")
               .equals(nodeToMatch_xihehy_a0a0b0c2_0.getConcept()))) {
             return false;
           }
           patternVar_method =
               nodeToMatch_xihehy_a0a0b0c2_0.getReferenceTarget(
                   MetaAdapterFactory.getReferenceLink(
                       0xf3061a5392264cc5L,
                       0xa443f952ceaf5816L,
                       0x11857355952L,
                       0xf8c78301adL,
                       "baseMethodDeclaration"));
           {
             SContainmentLink childRole_xihehy__1 =
                 MetaAdapterFactory.getContainmentLink(
                     0xf3061a5392264cc5L,
                     0xa443f952ceaf5816L,
                     0x11857355952L,
                     0xf8c78301aeL,
                     "actualArgument");
             if (!(PatternUtil.hasNChildren(
                 nodeToMatch_xihehy_a0a0b0c2_0, childRole_xihehy__1, 1))) {
               return false;
             }
             {
               SNode childVar_xihehy_a0a0a1a2c =
                   IterableUtil.get(
                       nodeToMatch_xihehy_a0a0b0c2_0.getChildren(childRole_xihehy__1), 0);
               {
                 SNode nodeToMatch_xihehy_a0a0a1a2c = childVar_xihehy_a0a0a1a2c;
                 if (!(MetaAdapterFactory.getConcept(
                         0xf3061a5392264cc5L,
                         0xa443f952ceaf5816L,
                         0xf93d565d10L,
                         "jetbrains.mps.baseLanguage.structure.StringLiteral")
                     .equals(nodeToMatch_xihehy_a0a0a1a2c.getConcept()))) {
                   return false;
                 }
                 patternVar_printed =
                     SNodeAccessUtil.getProperty(
                         nodeToMatch_xihehy_a0a0a1a2c,
                         MetaAdapterFactory.getProperty(
                             0xf3061a5392264cc5L,
                             0xa443f952ceaf5816L,
                             0xf93d565d10L,
                             0xf93d565d11L,
                             "value"));
               }
             }
           }
         }
       }
     }
   }
   return true;
 }