# HG changeset patch
# User dadubrow
# Date 1263397483 21600
# Node ID c3cf3704d340e3ec3240b8155c431e9e8c9b2fd4
# Parent  dfe9c76b4eb2d86bfb377387d6a0c586eb4a0be3
Make setting default part of reconciler responsibility

diff -r dfe9c76b4eb2 -r c3cf3704d340 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/status/ConnectionStatusReconciler.java
--- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/status/ConnectionStatusReconciler.java	Tue Jan 12 09:39:44 2010 -0600
+++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/status/ConnectionStatusReconciler.java	Wed Jan 13 09:44:43 2010 -0600
@@ -105,6 +105,8 @@
 		if (!isDynamic(connection))
 			return;
 		
+		reconcileAsDefault(connection);
+		
 		handledConnections.add((IConnection2) connection);
 		for (IConnectedService service : manager.getConnectedServices(connection)) {
 			if (service instanceof TRKConnectedService ||
@@ -115,6 +117,12 @@
 		reconcileConnection((IConnection2) connection);
 	}
 	
+	private void reconcileAsDefault(IConnection connection) {
+		// USB connections become default when added
+		if (USBConnectionType.ID.equals(connection.getConnectionType().getIdentifier()))
+			manager.setDefaultConnection(connection);
+	}
+
 	private void reconcileConnection(IConnection2 connection) {
 		boolean isSysTRK = false;
 		EStatus trkStatus = EStatus.UNKNOWN;