@@ -13,74 +13,75 @@ public void visitToken(DetailAST ast) {
1313        DetailAST  identifier  = ast .findFirstToken (TokenTypes .TYPE ).findFirstToken (TokenTypes .IDENT );
1414        if  (identifier  != null ) {
1515            String  fieldClassName  = identifier .getText ();
16+             String  ident  = ast .findFirstToken (TokenTypes .IDENT ).getText ();
1617            switch  (fieldClassName ) {
1718                case  "LinearLayout" :
18-                     if  (!ast . findFirstToken ( TokenTypes . IDENT ). getText () .startsWith ("lv" )) {
19+                     if  (!ident .startsWith ("lv" )) {
1920                        log (ast );
2021                    }
2122                    break ;
2223                case  "RelativeLayout" :
23-                     if  (!ast . findFirstToken ( TokenTypes . IDENT ). getText () .startsWith ("rl" )) {
24+                     if  (!ident .startsWith ("rl" )) {
2425                        log (ast );
2526                    }
2627                    break ;
2728                case  "ConstraintLayout" :
28-                     if  (!ast . findFirstToken ( TokenTypes . IDENT ). getText () .startsWith ("cl" )) {
29+                     if  (!ident .startsWith ("cl" )) {
2930                        log (ast );
3031                    }
3132                    break ;
3233                case  "FrameLayout" :
33-                     if  (!ast . findFirstToken ( TokenTypes . IDENT ). getText () .startsWith ("fl" )) {
34+                     if  (!ident .startsWith ("fl" )) {
3435                        log (ast );
3536                    }
3637                    break ;
3738                case  "ScrollView" :
38-                     if  (!ast . findFirstToken ( TokenTypes . IDENT ). getText () .startsWith ("sv" )) {
39+                     if  (!ident .startsWith ("sv" )) {
3940                        log (ast );
4041                    }
4142                    break ;
4243                case  "HorizontalScrollView" :
43-                     if  (!ast . findFirstToken ( TokenTypes . IDENT ). getText () .startsWith ("hsv" )) {
44+                     if  (!ident .startsWith ("hsv" )) {
4445                        log (ast );
4546                    }
4647                    break ;
4748                case  "TextView" :
48-                     if  (!ast . findFirstToken ( TokenTypes . IDENT ). getText () .startsWith ("tv" )) {
49+                     if  (!ident .startsWith ("tv" )) {
4950                        log (ast );
5051                    }
5152                    break ;
5253                case  "ImageView" :
53-                     if  (!ast . findFirstToken ( TokenTypes . IDENT ). getText () .startsWith ("iv" )) {
54+                     if  (!ident .startsWith ("iv" )) {
5455                        log (ast );
5556                    }
5657                    break ;
5758                case  "ImageButton" :
58-                     if  (!ast . findFirstToken ( TokenTypes . IDENT ). getText () .startsWith ("ib" )) {
59+                     if  (!ident .startsWith ("ib" )) {
5960                        log (ast );
6061                    }
6162                    break ;
6263                case  "EditText" :
63-                     if  (!ast . findFirstToken ( TokenTypes . IDENT ). getText () .startsWith ("et" )) {
64+                     if  (!ident .startsWith ("et" )) {
6465                        log (ast );
6566                    }
6667                    break ;
6768                case  "Button" :
68-                     if  (!ast . findFirstToken ( TokenTypes . IDENT ). getText () .startsWith ("btn" )) {
69+                     if  (!ident .startsWith ("btn" )) {
6970                        log (ast );
7071                    }
7172                    break ;
7273                case  "RecyclerView" :
73-                     if  (!ast . findFirstToken ( TokenTypes . IDENT ). getText () .startsWith ("rv" )) {
74+                     if  (!ident .startsWith ("rv" )) {
7475                        log (ast );
7576                    }
7677                    break ;
7778                case  "AdaptiveRecyclerView" :
78-                     if  (!ast . findFirstToken ( TokenTypes . IDENT ). getText () .startsWith ("arv" )) {
79+                     if  (!ident .startsWith ("arv" )) {
7980                        log (ast );
8081                    }
8182                    break ;
8283                case  "FloatingActionButton" :
83-                     if  (!ast . findFirstToken ( TokenTypes . IDENT ). getText () .startsWith ("fab" )) {
84+                     if  (!ident .startsWith ("fab" )) {
8485                        log (ast );
8586                    }
8687                    break ;
0 commit comments