]> source.dussan.org Git - vaadin-framework.git/commitdiff
Better debug info for hierachy changes
authorArtur Signell <artur@vaadin.com>
Tue, 13 Mar 2012 16:42:35 +0000 (18:42 +0200)
committerArtur Signell <artur@vaadin.com>
Wed, 14 Mar 2012 14:00:49 +0000 (16:00 +0200)
src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java

index 3113135b3115d0491feddb714b3ef984edaaf795..4f7ab8ed1f655672e2b55bb801790e6d357dd4ad 100644 (file)
@@ -10,6 +10,7 @@ import com.vaadin.terminal.gwt.client.ComponentConnector;
 import com.vaadin.terminal.gwt.client.ComponentContainerConnector;
 import com.vaadin.terminal.gwt.client.ConnectorHierarchyChangedEvent;
 import com.vaadin.terminal.gwt.client.Util;
+import com.vaadin.terminal.gwt.client.VConsole;
 
 public abstract class AbstractComponentContainerConnector extends
         AbstractComponentConnector implements ComponentContainerConnector {
@@ -56,8 +57,20 @@ public abstract class AbstractComponentContainerConnector extends
      */
     public void connectorHierarchyChanged(ConnectorHierarchyChangedEvent event) {
         // TODO Remove debug info
-        System.out.println("Hierarchy changed for " + Util.getSimpleName(this));
-        System.out.println("* Old children: " + event.getOldChildren());
-        System.out.println("* New children: " + getChildren());
+        VConsole.log("Hierarchy changed for " + Util.getSimpleName(this) + " ("
+                + getConnectorId() + ")");
+        String oldChildren = "* Old children: ";
+        for (ComponentConnector child : event.getOldChildren()) {
+            oldChildren += Util.getSimpleName(child) + " ("
+                    + child.getConnectorId() + ") ";
+        }
+        VConsole.log(oldChildren);
+
+        String newChildren = "* New children: ";
+        for (ComponentConnector child : getChildren()) {
+            newChildren += Util.getSimpleName(child) + " ("
+                    + child.getConnectorId() + ") ";
+        }
+        VConsole.log(newChildren);
     }
 }