calabash-android 0.4.7.pre8 → 0.4.7.pre9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- // $ANTLR 3.4 antlr/UIQuery.g 2013-02-02 18:08:56
1
+ // $ANTLR 3.4 antlr/UIQuery.g 2013-06-26 21:55:04
2
2
 
3
3
  package sh.calaba.instrumentationbackend.query.antlr;
4
4
 
@@ -14,7 +14,7 @@ import org.antlr.runtime.tree.*;
14
14
  @SuppressWarnings({"all", "warnings", "unchecked"})
15
15
  public class UIQueryParser extends Parser {
16
16
  public static final String[] tokenNames = new String[] {
17
- "<invalid>", "<EOR>", "<DOWN>", "<UP>", "ALL", "BEGINPRED", "BOOL", "DIRECTION", "ENDPRED", "ESC_SEQ", "FILTER_COLON", "HEX_DIGIT", "INT", "NAME", "NIL", "OCTAL_ESC", "QUALIFIED_NAME", "RELATION", "STRING", "UNICODE_ESC", "VISIBLE", "WHITE", "WILDCARD"
17
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "ALL", "BEGINPRED", "BOOL", "DIRECTION", "DOUBLE_ESC_SEQ", "ENDPRED", "ESC_SEQ", "FILTER_COLON", "HEX_DIGIT", "INT", "NAME", "NIL", "OCTAL_ESC", "QUALIFIED_NAME", "RELATION", "STRING", "UNICODE_ESC", "VISIBLE", "WHITE", "WILDCARD"
18
18
  };
19
19
 
20
20
  public static final int EOF=-1;
@@ -22,21 +22,22 @@ public class UIQueryParser extends Parser {
22
22
  public static final int BEGINPRED=5;
23
23
  public static final int BOOL=6;
24
24
  public static final int DIRECTION=7;
25
- public static final int ENDPRED=8;
26
- public static final int ESC_SEQ=9;
27
- public static final int FILTER_COLON=10;
28
- public static final int HEX_DIGIT=11;
29
- public static final int INT=12;
30
- public static final int NAME=13;
31
- public static final int NIL=14;
32
- public static final int OCTAL_ESC=15;
33
- public static final int QUALIFIED_NAME=16;
34
- public static final int RELATION=17;
35
- public static final int STRING=18;
36
- public static final int UNICODE_ESC=19;
37
- public static final int VISIBLE=20;
38
- public static final int WHITE=21;
39
- public static final int WILDCARD=22;
25
+ public static final int DOUBLE_ESC_SEQ=8;
26
+ public static final int ENDPRED=9;
27
+ public static final int ESC_SEQ=10;
28
+ public static final int FILTER_COLON=11;
29
+ public static final int HEX_DIGIT=12;
30
+ public static final int INT=13;
31
+ public static final int NAME=14;
32
+ public static final int NIL=15;
33
+ public static final int OCTAL_ESC=16;
34
+ public static final int QUALIFIED_NAME=17;
35
+ public static final int RELATION=18;
36
+ public static final int STRING=19;
37
+ public static final int UNICODE_ESC=20;
38
+ public static final int VISIBLE=21;
39
+ public static final int WHITE=22;
40
+ public static final int WILDCARD=23;
40
41
 
41
42
  // delegates
42
43
  public Parser[] getDelegates() {
@@ -744,9 +745,9 @@ public TreeAdaptor getTreeAdaptor() {
744
745
 
745
746
 
746
747
 
747
- public static final BitSet FOLLOW_expr_in_query56 = new BitSet(new long[]{0x0000000000200002L});
748
- public static final BitSet FOLLOW_WHITE_in_query59 = new BitSet(new long[]{0x00000000005120B0L});
749
- public static final BitSet FOLLOW_expr_in_query62 = new BitSet(new long[]{0x0000000000200002L});
748
+ public static final BitSet FOLLOW_expr_in_query56 = new BitSet(new long[]{0x0000000000400002L});
749
+ public static final BitSet FOLLOW_WHITE_in_query59 = new BitSet(new long[]{0x0000000000A240B0L});
750
+ public static final BitSet FOLLOW_expr_in_query62 = new BitSet(new long[]{0x0000000000400002L});
750
751
  public static final BitSet FOLLOW_className_in_expr80 = new BitSet(new long[]{0x0000000000000002L});
751
752
  public static final BitSet FOLLOW_filter_in_expr84 = new BitSet(new long[]{0x0000000000000002L});
752
753
  public static final BitSet FOLLOW_visibility_in_expr88 = new BitSet(new long[]{0x0000000000000002L});
@@ -757,15 +758,15 @@ public TreeAdaptor getTreeAdaptor() {
757
758
  public static final BitSet FOLLOW_QUALIFIED_NAME_in_className150 = new BitSet(new long[]{0x0000000000000002L});
758
759
  public static final BitSet FOLLOW_ALL_in_visibility188 = new BitSet(new long[]{0x0000000000000002L});
759
760
  public static final BitSet FOLLOW_VISIBLE_in_visibility193 = new BitSet(new long[]{0x0000000000000002L});
760
- public static final BitSet FOLLOW_NAME_in_filter220 = new BitSet(new long[]{0x0000000000000400L});
761
- public static final BitSet FOLLOW_FILTER_COLON_in_filter222 = new BitSet(new long[]{0x0000000000045040L});
761
+ public static final BitSet FOLLOW_NAME_in_filter220 = new BitSet(new long[]{0x0000000000000800L});
762
+ public static final BitSet FOLLOW_FILTER_COLON_in_filter222 = new BitSet(new long[]{0x000000000008A040L});
762
763
  public static final BitSet FOLLOW_set_in_filter225 = new BitSet(new long[]{0x0000000000000002L});
763
- public static final BitSet FOLLOW_BEGINPRED_in_predicate258 = new BitSet(new long[]{0x0000000000002000L});
764
- public static final BitSet FOLLOW_NAME_in_predicate261 = new BitSet(new long[]{0x0000000000200000L});
765
- public static final BitSet FOLLOW_WHITE_in_predicate263 = new BitSet(new long[]{0x0000000000020000L});
766
- public static final BitSet FOLLOW_RELATION_in_predicate266 = new BitSet(new long[]{0x0000000000200000L});
767
- public static final BitSet FOLLOW_WHITE_in_predicate268 = new BitSet(new long[]{0x0000000000045040L});
768
- public static final BitSet FOLLOW_set_in_predicate271 = new BitSet(new long[]{0x0000000000000100L});
764
+ public static final BitSet FOLLOW_BEGINPRED_in_predicate258 = new BitSet(new long[]{0x0000000000004000L});
765
+ public static final BitSet FOLLOW_NAME_in_predicate261 = new BitSet(new long[]{0x0000000000400000L});
766
+ public static final BitSet FOLLOW_WHITE_in_predicate263 = new BitSet(new long[]{0x0000000000040000L});
767
+ public static final BitSet FOLLOW_RELATION_in_predicate266 = new BitSet(new long[]{0x0000000000400000L});
768
+ public static final BitSet FOLLOW_WHITE_in_predicate268 = new BitSet(new long[]{0x000000000008A040L});
769
+ public static final BitSet FOLLOW_set_in_predicate271 = new BitSet(new long[]{0x0000000000000200L});
769
770
  public static final BitSet FOLLOW_ENDPRED_in_predicate287 = new BitSet(new long[]{0x0000000000000002L});
770
771
 
771
772
  }
@@ -10,8 +10,7 @@ public class UIQueryASTClassName implements UIQueryAST {
10
10
  public final Class qualifiedClassName;
11
11
 
12
12
  public UIQueryASTClassName(String simpleClassName)
13
- {
14
- if (simpleClassName == null) {throw new IllegalArgumentException("Cannot instantiate with null class");}
13
+ {
15
14
  this.simpleClassName = simpleClassName;
16
15
  this.qualifiedClassName = null;
17
16
  }
@@ -112,6 +111,9 @@ public class UIQueryASTClassName implements UIQueryAST {
112
111
 
113
112
  private boolean match(Object o)
114
113
  {
114
+ if (this.simpleClassName == null && this.qualifiedClassName == null) {
115
+ return false;
116
+ }
115
117
  return matchSimpleClassName(o,this.simpleClassName) ||
116
118
  matchQualifiedClassName(o,this.qualifiedClassName);
117
119
  }
@@ -122,11 +124,14 @@ public class UIQueryASTClassName implements UIQueryAST {
122
124
  }
123
125
 
124
126
  public static boolean matchSimpleClassName(Object o, String simpleClassName) {
125
- // TODO Auto-generated method stub
126
127
  return simpleClassName != null && simpleClassName.equalsIgnoreCase(o.getClass().getSimpleName());
127
128
  }
128
129
 
129
130
  public String toString() {
131
+ if (this.simpleClassName == null && this.qualifiedClassName == null) {
132
+ return "Class[null]";
133
+ }
134
+
130
135
  if (this.simpleClassName != null)
131
136
  {
132
137
  return "Class["+this.simpleClassName+"]";
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calabash-android
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7.pre8
4
+ version: 0.4.7.pre9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Maturana Larsen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-26 00:00:00.000000000 Z
11
+ date: 2013-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber