aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManolo Carrasco <manolo@apache.org>2011-03-03 13:13:50 +0000
committerManolo Carrasco <manolo@apache.org>2011-03-03 13:13:50 +0000
commitee2cdc4537654df07dbc8ced6f72c3daf65b951c (patch)
treeb02193ff2ae505b60855a8aae943d2ec8793da11
parentedfc97709bb5fdebea542cc6d84c4b0a7b4fae70 (diff)
downloadgwtquery-ee2cdc4537654df07dbc8ced6f72c3daf65b951c.tar.gz
gwtquery-ee2cdc4537654df07dbc8ced6f72c3daf65b951c.zip
Replacing JSArray class in generators
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/rebind/SelectorGeneratorBase.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/SelectorGeneratorBase.java b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/SelectorGeneratorBase.java
index ae1ad643..90b1f7d2 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/SelectorGeneratorBase.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/SelectorGeneratorBase.java
@@ -93,19 +93,19 @@ public abstract class SelectorGeneratorBase extends Generator {
if (sel != null && sel.value().matches("^#\\w+$")) {
// short circuit #foo
sw.println("return "
- + wrap(method, "JSArray.create(((Document)root).getElementById(\""
+ + wrap(method, "JsNodeArray.create(((Document)root).getElementById(\""
+ sel.value().substring(1) + "\"))") + ";");
} else if (sel != null && sel.value().matches("^\\w+$")) {
// short circuit FOO
sw.println("return "
+ wrap(method,
- "JSArray.create(((Element)root).getElementsByTagName(\""
+ "JsNodeArray.create(((Element)root).getElementsByTagName(\""
+ sel.value() + "\"))") + ";");
} else if (sel != null && sel.value().matches("^\\.\\w+$")
&& hasGetElementsByClassName()) {
// short circuit .foo for browsers with native getElementsByClassName
sw.println("return "
- + wrap(method, "JSArray.create(getElementsByClassName(\""
+ + wrap(method, "JsNodeArray.create(getElementsByClassName(\""
+ sel.value().substring(1) + "\", root))") + ";");
} else {
generateMethodBody(sw, method, logger, hasContext);
@@ -137,6 +137,7 @@ public abstract class SelectorGeneratorBase extends Generator {
packageName, className);
composerFactory.setSuperclass("com.google.gwt.query.client.impl.SelectorEngine");
composerFactory.addImport("com.google.gwt.query.client.impl.*");
+ composerFactory.addImport("com.google.gwt.query.client.js.*");
composerFactory.addImport("com.google.gwt.query.client.Selectors.*");
composerFactory.addImport("com.google.gwt.query.client.*");
composerFactory.addImport("com.google.gwt.core.client.*");