From: Artur Signell Date: Fri, 16 Mar 2012 18:14:26 +0000 (+0200) Subject: Minor debug info changes X-Git-Tag: 7.0.0.alpha2~287 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=53206bcaaede50b4a47a852fdf7ac35d87669088;p=vaadin-framework.git Minor debug info changes --- diff --git a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java index fdaaf17d3b..95483eac92 100644 --- a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java +++ b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java @@ -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); } diff --git a/src/com/vaadin/terminal/gwt/client/Util.java b/src/com/vaadin/terminal/gwt/client/Util.java index 708483f3ba..58c5730c79 100644 --- a/src/com/vaadin/terminal/gwt/client/Util.java +++ b/src/com/vaadin/terminal/gwt/client/Util.java @@ -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() + ")"; + } } diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java index 4f7ab8ed1f..c24b26660d 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java @@ -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); }