From: Artur Signell Date: Tue, 13 Mar 2012 16:42:35 +0000 (+0200) Subject: Better debug info for hierachy changes X-Git-Tag: 7.0.0.alpha2~337 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e61d79e7ff0773641d3ba959d4c9d2147b2b9a3a;p=vaadin-framework.git Better debug info for hierachy changes --- diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java index 3113135b31..4f7ab8ed1f 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java @@ -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); } }