]> source.dussan.org Git - gwtquery.git/commitdiff
Replace tabs by spaces
authorManolo Carrasco <manolo@apache.org>
Wed, 31 Dec 2014 17:40:01 +0000 (18:40 +0100)
committerManolo Carrasco <manolo@apache.org>
Wed, 31 Dec 2014 17:40:01 +0000 (18:40 +0100)
13 files changed:
gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
gwtquery-core/src/main/java/com/google/gwt/query/client/css/ZIndexProperty.java
gwtquery-core/src/main/java/com/google/gwt/query/client/impl/AttributeTridentImpl.java
gwtquery-core/src/main/java/com/google/gwt/query/client/impl/ConsoleBrowser.java
gwtquery-core/src/main/java/com/google/gwt/query/client/impl/DocumentStyleImpl.java
gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineCssToXPath.java
gwtquery-core/src/main/java/com/google/gwt/query/client/impl/research/SelectorEngineJSIE.java
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MousePlugin.java
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/GqEvent.java
gwtquery-core/src/main/java/com/google/gwt/query/rebind/BrowserGenerator.java
gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsonBuilderGenerator.java
gwtquery-core/src/main/java/com/google/gwt/query/rebind/XmlBuilderGenerator.java

index 098cb2da89e7e329cf301b3f54c192d3e894d28b..d0baf61c53840b6bbf54dd6deb69479c74e39f30 100644 (file)
@@ -780,12 +780,12 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
   }
 
   private static native void scrollIntoViewImpl(Node n) /*-{
-               if (n)
-                       n.scrollIntoView()
+    if (n)
+      n.scrollIntoView()
   }-*/;
 
   private static native void setElementValue(Element e, String value) /*-{
-               e.value = value;
+    e.value = value;
   }-*/;
 
   protected Node currentContext;
@@ -2388,10 +2388,10 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
   }
 
   private native Element getPreviousSiblingElement(Element elem) /*-{
-               var sib = elem.previousSibling;
-               while (sib && sib.nodeType != 1)
-                       sib = sib.previousSibling;
-               return sib;
+    var sib = elem.previousSibling;
+    while (sib && sib.nodeType != 1)
+      sib = sib.previousSibling;
+    return sib;
   }-*/;
 
   /**
index e9da1ba16fe952189964890c37418af654d63293..dfb7fcfc08828439ca80ed2f915e870d9cb6cb8c 100644 (file)
@@ -64,8 +64,8 @@ public class ZIndexProperty implements TakesInteger {
    * http://code.google.com/p/google-web-toolkit/issues/detail?id=5548
    */
   private native String getZIndex(Style s) /*-{
-               //force to return a string
-               return "" + s["zIndex"];
+    //force to return a string
+    return "" + s["zIndex"];
   }-*/;
 
 }
index 7bb9aeeed489726c3e9af5d8741a189d6c329330..2e22cedaf084091531803d934064aef2fe4294cd 100644 (file)
@@ -61,21 +61,21 @@ public class AttributeTridentImpl extends AttributeImpl {
   }
 
   private static native String getAttributeNode(Element e, String name)/*-{
-               var attrNode = e.getAttributeNode(name);
-               if (attrNode && attrNode.nodeValue !== "") {
-                       return attrNode.nodeValue;
-               }
-               return null;
+    var attrNode = e.getAttributeNode(name);
+    if (attrNode && attrNode.nodeValue !== "") {
+      return attrNode.nodeValue;
+    }
+    return null;
   }-*/;
 
   private static native boolean setAttributeNode(Element e, String name,
       Object value)/*-{
-               var attrNode = e.getAttributeNode(name);
-               if (attrNode) {
-                       attrNode.nodeValue = value;
-                       return true;
-               }
-               return false;
+    var attrNode = e.getAttributeNode(name);
+    if (attrNode) {
+      attrNode.nodeValue = value;
+      return true;
+    }
+    return false;
   }-*/;
 
   @Override
index 0c3b10901f7f763801f84417f49f0f03e302b44d..6b7fb16209d9cc7110ed7c56a1bfbe0902891b0f 100644 (file)
@@ -53,10 +53,10 @@ public class ConsoleBrowser implements Console {
 
     protected native void init()/*-{
       try {
-                               [ "log", "info", "warn", "error", "dir", "clear", "profile", "profileEnd" ]
-                                 .forEach(function(method) {
-                                         $wnd.console[method] = this.call($wnd.console[method], $wnd.console);
-                                 }, Function.prototype.bind);
+        [ "log", "info", "warn", "error", "dir", "clear", "profile", "profileEnd" ]
+          .forEach(function(method) {
+            $wnd.console[method] = this.call($wnd.console[method], $wnd.console);
+          }, Function.prototype.bind);
         this.@com.google.gwt.query.client.impl.ConsoleBrowser.ConsoleIe9::initialized = true;
       } catch(e) {
       }
index 24008e1b3a11560d7cf6757ccdf7e417a9b64a0a..3123a57ca478a2e7660e6fd361fb893f02397f66 100644 (file)
@@ -100,8 +100,8 @@ public class DocumentStyleImpl {
 
       Element toDetach = null;
       if (JsUtils.isDetached(elem)) {
-       // If the element is detached to the DOM we attach temporary to it
-       toDetach = attachTemporary(elem);
+        // If the element is detached to the DOM we attach temporary to it
+        toDetach = attachTemporary(elem);
       }
 
       if (sizeRegex.test(name)) {
@@ -114,7 +114,7 @@ public class DocumentStyleImpl {
 
       // If the element was previously attached, detached it.
       if (toDetach != null) {
-         toDetach.removeFromParent();
+        toDetach.removeFromParent();
       }
     }
 
@@ -122,17 +122,17 @@ public class DocumentStyleImpl {
   }
 
   private Element attachTemporary(Element elem) {
-       Element  lastParent = $(elem).parents().last().get(0);
-
-       if (lastParent == null){
-               //the element itself is detached
-               lastParent = elem;
-       }
-
-       Document.get().getBody().appendChild(lastParent);
-
-       return lastParent;
-}
+    Element  lastParent = $(elem).parents().last().get(0);
+  
+    if (lastParent == null){
+      //the element itself is detached
+      lastParent = elem;
+    }
+  
+    Document.get().getBody().appendChild(lastParent);
+  
+    return lastParent;
+  }
 
   /**
    * Fix style property names.
index cbee96f1de3425ad7d0feeb2f6deba294a29f1e0..e5fa3fa4686f88614b16c5fd27018ade8c6d2802 100644 (file)
@@ -91,12 +91,12 @@ public class SelectorEngineCssToXPath extends SelectorEngineImpl {
         return prefix + "[position() mod 2=0 and position()>=0]" + (noPrefix ? "" : "/self::" + s1);
       }
       if ("odd".equals(s2)) {
-         prefix = afterAttr ? prefix : noPrefix ? "" : s1;
+        prefix = afterAttr ? prefix : noPrefix ? "" : s1;
         return prefix + "[(count(preceding-sibling::*) + 1) mod 2=1]";
       }
 
       if (!s2.contains("n")){
-         return prefix + "[position() = "+s2+"]" + (noPrefix ? "" : "/self::" + s1);
+        return prefix + "[position() = "+s2+"]" + (noPrefix ? "" : "/self::" + s1);
       }
 
       String[] t = s2.replaceAll("^([0-9]*)n.*?([0-9]*)?$", "$1+$2").split("\\+");
index 370d3c6b6f8ee11c89b2abf12e26bc0ab5e789be..f02eb8579fe0c2e23f6ccbd46d898d453e203c06 100644 (file)
@@ -24,14 +24,14 @@ import com.google.gwt.dom.client.Element;
 public class SelectorEngineJSIE extends SelectorEngineJS {
 
   public native String getAttr(Element elm, String attr) /*-{
-       switch (attr) {
-        case "id":
-          return elm.id;
-        case "for":
-          return elm.htmlFor;
-        case "class":
-          return elm.className;
-       }
-       return elm.getAttribute(attr, 2);
+       switch (attr) {
+   case "id":
+     return elm.id;
+   case "for":
+     return elm.htmlFor;
+   case "class":
+     return elm.className;
+  }
+  return elm.getAttribute(attr, 2);
    }-*/;
 }
index aca8db0594182b31dc9a74f3a5c1838f2c91f0c0..9dbbc6714702e45e971844dd1306b54d096f0e11 100755 (executable)
@@ -281,12 +281,12 @@ public abstract class MousePlugin extends UiPlugin {
   }
 
   private native boolean isEventAlreadyHandled(GqEvent event)/*-{
-               var result = event.mouseHandled ? event.mouseHandled : false;
-               return result;
+    var result = event.mouseHandled ? event.mouseHandled : false;
+    return result;
   }-*/;
 
   private native void markEventAsHandled(GqEvent event)/*-{
-               event.mouseHandled = true;
+    event.mouseHandled = true;
   }-*/;
 
   private boolean notHandleMouseDown(Element element, GqEvent mouseDownEvent) {
index 5f3cf5314350b156884ec819e3dcba32efb05b8c..0adf1ddfdd5b6d4ec74c38c8c93ddd9a686a7faf 100644 (file)
@@ -412,44 +412,44 @@ public class EventsListener implements EventListener {
   }
 
   private static native void cleanGQListeners(Element elem) /*-{
-               if (elem.__gwtlistener) {
+    if (elem.__gwtlistener) {
       @com.google.gwt.user.client.DOM::setEventListener(*)(elem, elem.__gwtlistener);
-               }
-               elem.__gwtlistener = elem.__gqueryevent = elem.__gquery = null;
+    }
+    elem.__gwtlistener = elem.__gqueryevent = elem.__gquery = null;
   }-*/;
 
   private static native EventsListener getGQueryEventListener(Element elem) /*-{
-               return elem.__gqueryevent;
+    return elem.__gqueryevent;
   }-*/;
 
   private static native EventListener getGwtEventListener(Element elem) /*-{
-               return elem.__gwtlistener;
+    return elem.__gwtlistener;
   }-*/;
 
   private static native void init(Element elem, EventsListener gqevent)/*-{
-               elem.__gwtlistener = @com.google.gwt.user.client.DOM::getEventListener(*)(elem);
+    elem.__gwtlistener = @com.google.gwt.user.client.DOM::getEventListener(*)(elem);
     elem.__gqueryevent = gqevent;
     // Someone has reported that in IE the init can be called multiple times
     // causing a loop. We need some test to demonstrate this behaviour though.
     // Anyway we check this condition to avoid looping
-               if (elem.__gwtlistener == gqevent) elem.__gwtlistener = null;
+    if (elem.__gwtlistener == gqevent) elem.__gwtlistener = null;
   }-*/;
 
   private static native void sinkBitlessEvent(Element elem, String name) /*-{
-               if (!elem.__gquery)
-                       elem.__gquery = [];
-               if (elem.__gquery[name])
-                       return;
-               elem.__gquery[name] = true;
-
-               var handle = function(event) {
-                       elem.__gqueryevent.@com.google.gwt.query.client.plugins.events.EventsListener::onBrowserEvent(Lcom/google/gwt/user/client/Event;)(event);
-               };
-
-               if (elem.addEventListener)
-                       elem.addEventListener(name, handle, true);
-               else
-                       elem.attachEvent("on" + name, handle);
+    if (!elem.__gquery)
+      elem.__gquery = [];
+    if (elem.__gquery[name])
+      return;
+    elem.__gquery[name] = true;
+
+    var handle = function(event) {
+      elem.__gqueryevent.@com.google.gwt.query.client.plugins.events.EventsListener::onBrowserEvent(Lcom/google/gwt/user/client/Event;)(event);
+    };
+
+    if (elem.addEventListener)
+      elem.addEventListener(name, handle, true);
+    else
+      elem.attachEvent("on" + name, handle);
   }-*/;
 
   int eventBits = 0;
index 1a92374f65e9f0d03662ba06de2c60b6a5cc2045..f961c09817e2fbc78ae31fb42ad434f674c3b029 100644 (file)
@@ -47,10 +47,10 @@ public class GqEvent extends Event {
 
   private static native void copy(
       Event originalEvent, GqEvent gQueryEvent) /*-{
-               for ( var field in originalEvent) {
-                       gQueryEvent[field] = originalEvent[field];
-               }
-               gQueryEvent.originalEvent = originalEvent;
+    for ( var field in originalEvent) {
+      gQueryEvent[field] = originalEvent[field];
+    }
+    gQueryEvent.originalEvent = originalEvent;
   }-*/;
 
 
@@ -61,7 +61,7 @@ public class GqEvent extends Event {
    * Return the original event (the one created by the browser)
    */
   public final native Event getOriginalEvent()/*-{
-               return this.originalEvent;
+    return this.originalEvent;
   }-*/;
 
   public final native void setCurrentElementTarget(Element e)/*-{
index 3f18fd104a47fa3a1ce9e0e2d10bf1efc2d765e9..76b539f82faeecbfd7b786ba5d35764775c439d3 100644 (file)
@@ -68,7 +68,7 @@ public class BrowserGenerator extends Generator {
       writer.println("protected boolean isIe10() {return " + "ie10".equals(ua) + ";}");
       writer.println("protected boolean isIe11() {return " + "gecko1_8".equals(ua) + ";}");
       writer.println("public String toString() {return \"Browser:\"" +
-               " + \" webkit=\" + webkit" +
+          " + \" webkit=\" + webkit" +
           " + \" mozilla=\" + mozilla" +
           " + \" opera=\" + opera" +
           " + \" msie=\" + msie" +
index c2383c19d0c1f6863af1ea43da50875986e18f3d..3fcbad93b6e1c0043dae86759febe993237354eb 100644 (file)
@@ -170,15 +170,15 @@ public class JsonBuilderGenerator extends Generator {
       } else if (retType.equals("java.lang.Byte")) {
         sw.println("return (byte) p.getFloat(\"" + name + "\");");
       } else if (retType.equals("java.lang.Integer")) {
-         sw.println("return (int) p.getFloat(\"" + name + "\");");
+        sw.println("return (int) p.getFloat(\"" + name + "\");");
       } else if (retType.equals("java.lang.Float")) {
-         sw.println("return p.getFloat(\"" + name + "\");");
+        sw.println("return p.getFloat(\"" + name + "\");");
       } else if (retType.equals("java.lang.Double")) {
-         sw.println("return (double) p.getFloat(\"" + name + "\");");
+        sw.println("return (double) p.getFloat(\"" + name + "\");");
       } else if (retType.equals("java.lang.Long")) {
-         sw.println("return (long) p.getFloat(\"" + name + "\");");
+        sw.println("return (long) p.getFloat(\"" + name + "\");");
       } else if (retType.equals("java.lang.Byte")) {
-         sw.println("return (byte) p.getFloat(\"" + name + "\");");
+        sw.println("return (byte) p.getFloat(\"" + name + "\");");
       } else if (isTypeAssignableTo(method.getReturnType(), stringType)) {
         sw.println("return p.getStr(\"" + name + "\");");
       } else if (isTypeAssignableTo(method.getReturnType(), jsonBuilderType)) {
@@ -222,7 +222,7 @@ public class JsonBuilderGenerator extends Generator {
           sw.println("return Arrays.asList(" + ret + ");");
         }
       } else if (method.getReturnType().isEnum() != null){
-         sw.println("return "+ method.getReturnType().getQualifiedSourceName() + ".valueOf(p.getStr(\"" + name + "\"));");
+        sw.println("return "+ method.getReturnType().getQualifiedSourceName() + ".valueOf(p.getStr(\"" + name + "\"));");
       } else {
         sw.println("System.err.println(\"JsonBuilderGenerator WARN: unknown return type "
             + retType + " " + ifaceName + "." + name + "()\"); ");
index e643ecc1720d8b19decb3d1d7ab0136d98440751..e5d195b76914ff064a82c1cba6778cac915d8298 100644 (file)
@@ -54,9 +54,9 @@ public class XmlBuilderGenerator extends Generator {
         t[1], requestedClass);
     if (sw != null) {
       for (JMethod method : clazz.getInheritableMethods()) {
-       //skip method from JsonBuilder
+        //skip method from JsonBuilder
         if(xmlBuilderType.findMethod(method.getName(), method.getParameterTypes()) != null){
-               continue;
+            continue;
         }
         generateMethod(sw, method, treeLogger);
       }