From e61d79e7ff0773641d3ba959d4c9d2147b2b9a3a Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Tue, 13 Mar 2012 18:42:35 +0200 Subject: [PATCH] Better debug info for hierachy changes --- .../AbstractComponentContainerConnector.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) 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); } } -- 2.39.5