@@ -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); | |||
} | |||
@@ -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() + ")"; | |||
} | |||
} |
@@ -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); | |||
} |