// 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;
}
/**
* 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;
}
return true;
}
+
+ public static String getConnectorString(ServerConnector p) {
+ if (p == null) {
+ return "null";
+ }
+ return p.getClass().getName() + " (" + p.getConnectorId() + ")";
+ }
}
*/
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);
}