]> source.dussan.org Git - vaadin-framework.git/commitdiff
Minor debug info changes
authorArtur Signell <artur@vaadin.com>
Fri, 16 Mar 2012 18:14:26 +0000 (20:14 +0200)
committerArtur Signell <artur@vaadin.com>
Wed, 21 Mar 2012 13:27:31 +0000 (15:27 +0200)
src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
src/com/vaadin/terminal/gwt/client/Util.java
src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java

index fdaaf17d3b6ca342190a363725fe038c65390809..95483eac92464751efb1fdad46f49a281df3033e 100644 (file)
@@ -2220,7 +2220,7 @@ public class ApplicationConnection {
     @Deprecated
     public void unregisterPaintable(ServerConnector p) {
         System.out.println("unregisterPaintable (unnecessarily) called for "
-                + p.getConnectorId());
+                + Util.getConnectorString(p));
         // connectorMap.unregisterConnector(p);
     }
 
index 708483f3baf9801410c64fea747860f0324e2137..58c5730c794ef7546ca1a0235a3444ed5cc7588c 100644 (file)
@@ -835,8 +835,8 @@ public class Util {
                     // TODO paintables inside lists/maps get rendered as
                     // components in the debug console
                     String formattedValue = value instanceof ServerConnector ? c
-                            .getConnectorMap()
-                            .getConnectorId((ServerConnector) value) : String
+                            .getConnectorMap().getConnectorId(
+                                    (ServerConnector) value) : String
                             .valueOf(value);
                     formattedParams = parameters[0] + " : " + formattedValue;
                 }
@@ -1100,12 +1100,15 @@ public class Util {
     /**
      * Performs a shallow comparison of the collections.
      * 
-     * @param collection1 The first collection
-     * @param collection2 The second collection
+     * @param collection1
+     *            The first collection
+     * @param collection2
+     *            The second collection
      * @return true if the collections contain the same elements in the same
      *         order, false otherwise
      */
-    public static boolean collectionsEquals(Collection collection1, Collection collection2) {
+    public static boolean collectionsEquals(Collection collection1,
+            Collection collection2) {
         if (collection1 == null) {
             return collection2 == null;
         }
@@ -1131,4 +1134,11 @@ public class Util {
 
         return true;
     }
+
+    public static String getConnectorString(ServerConnector p) {
+        if (p == null) {
+            return "null";
+        }
+        return p.getClass().getName() + " (" + p.getConnectorId() + ")";
+    }
 }
index 4f7ab8ed1f655672e2b55bb801790e6d357dd4ad..c24b26660dc919df41b72e288598ad2d486ac5fe 100644 (file)
@@ -57,19 +57,16 @@ public abstract class AbstractComponentContainerConnector extends
      */
     public void connectorHierarchyChanged(ConnectorHierarchyChangedEvent event) {
         // TODO Remove debug info
-        VConsole.log("Hierarchy changed for " + Util.getSimpleName(this) + " ("
-                + getConnectorId() + ")");
+        VConsole.log("Hierarchy changed for " + Util.getConnectorString(this));
         String oldChildren = "* Old children: ";
         for (ComponentConnector child : event.getOldChildren()) {
-            oldChildren += Util.getSimpleName(child) + " ("
-                    + child.getConnectorId() + ") ";
+            oldChildren += Util.getConnectorString(child) + " ";
         }
         VConsole.log(oldChildren);
 
         String newChildren = "* New children: ";
         for (ComponentConnector child : getChildren()) {
-            newChildren += Util.getSimpleName(child) + " ("
-                    + child.getConnectorId() + ") ";
+            newChildren += Util.getConnectorString(child) + " ";
         }
         VConsole.log(newChildren);
     }