connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/SettingsWizard.java
changeset 687 593d05f9d5ca
parent 163 b25acbfc406a
child 699 fe13162b76cf
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/SettingsWizard.java	Wed Dec 16 08:50:16 2009 -0600
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/SettingsWizard.java	Wed Dec 16 10:27:32 2009 -0600
@@ -21,6 +21,7 @@
 import com.nokia.carbide.remoteconnections.Messages;
 import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator;
 import com.nokia.carbide.remoteconnections.interfaces.*;
+import com.nokia.carbide.remoteconnections.internal.registry.Registry;
 
 import org.eclipse.jface.wizard.*;
 import org.eclipse.swt.widgets.Shell;
@@ -96,23 +97,23 @@
 			String id = null;
 			if (connectionToEdit != null) {
 				id = connectionToEdit.getIdentifier();
-				RemoteConnectionsActivator.getConnectionsManager().removeConnection(connectionToEdit);
+				Registry.instance().removeConnection(connectionToEdit);
 			}
 			connectionToEdit = newConnectionType.getConnectionFactory().createConnection(newSettings);
 			if (id != null)
 				connectionToEdit.setIdentifier(id);
-			RemoteConnectionsActivator.getConnectionsManager().addConnection(connectionToEdit);
+			Registry.instance().addConnection(connectionToEdit);
 		}
 		else if (newSettings != null) {
 			connectionToEdit.updateSettings(newSettings);
 		}
 		if (!newName.equals(connectionToEdit.getDisplayName())) {
 			connectionToEdit.setDisplayName(newName);
-			RemoteConnectionsActivator.getConnectionsManager().updateDisplays();
+			Registry.instance().updateDisplays();
 		}
 		
 		enableConnectedServices(true);
-		RemoteConnectionsActivator.getConnectionsManager().storeConnections();
+		Registry.instance().storeConnections();
 		return true;
 	}
 	
@@ -123,7 +124,7 @@
 	}
 
 	private void saveConnectedServicesEnabledState() {
-		Collection<IConnectedService> connectedServices = RemoteConnectionsActivator.getConnectionsManager().getConnectedServices(connectionToEdit);
+		Collection<IConnectedService> connectedServices = Registry.instance().getConnectedServices(connectionToEdit);
 		if (connectedServices == null)
 			return;
 		if (savedEnabledStates == null)
@@ -134,7 +135,7 @@
 	}
 
 	private void enableConnectedServices(boolean enabled) {
-		Collection<IConnectedService> connectedServices = RemoteConnectionsActivator.getConnectionsManager().getConnectedServices(connectionToEdit);
+		Collection<IConnectedService> connectedServices = Registry.instance().getConnectedServices(connectionToEdit);
 		if (connectedServices == null || savedEnabledStates == null)
 			return;
 		for (IConnectedService connectedService : connectedServices) {