# HG changeset patch # User dadubrow # Date 1278008911 18000 # Node ID ab85ee3ba5860c05a5322a74bb5d52625467b0f8 # Parent c4e41d93d2ed1d5cb60bc119bcd6e54ca8d0fee6# Parent f078617f9037b0aa9fc069edded6cef7f0453cfb merge diff -r c4e41d93d2ed -r ab85ee3ba586 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectionsManager.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectionsManager.java Thu Jul 01 13:27:31 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/IConnectionsManager.java Thu Jul 01 13:28:31 2010 -0500 @@ -177,11 +177,13 @@ IConnection getCurrentConnection(); /** - * Returns the IClientServiceSiteUI2 for a service. Filters connection types to those that - * are supported by the service. Connection list UI as well as new and edit wizards are filtered. + * Returns the IClientServiceSiteUI2 for selecting a connection. * Allows selecting a "current" connection which maps to #getCurrentConnection() - * when you use #ensureConenction(). - * @param service IService + * when you use #ensureConnection(). + *
+ * Optionally filters connection types to those that are supported by the
+ * service. Connection list UI as well as new and edit wizards are filtered.
+ * @param service IService or null
* @return IClientServiceSiteUI2
* @since 2.5
*/
@@ -189,7 +191,7 @@
/**
* Can be called by specific service implementors (e.g., debugger) to ensure some connection
- * exists and supports this service. If the connection does not exist or does not support
+ * exists and optionally supports this service. If the connection does not exist or does not support
* the service, a CoreException may be thrown after the framework attempts to allow the user
* to correct the situation by showing a connection selection dialog.
* If an ISelectedConnectionInfo is returned, {@link ISelectedConnectionInfo#getConnection()}
@@ -197,7 +199,7 @@
* and {@link ISelectedConnectionInfo#getStorableId()} is the id that can
* be stored by the caller that represents the user's selection.
* @param connectionId String
- * @param service IService
+ * @param service IService or null
* @return ISelectedConnectionInfo
* @throws CoreException
* @since 2.5
diff -r c4e41d93d2ed -r ab85ee3ba586 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java Thu Jul 01 13:27:31 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java Thu Jul 01 13:28:31 2010 -0500
@@ -301,7 +301,11 @@
if (listeners == null)
return;
for (IConnectionsManagerListener listener : listeners) {
- listener.connectionStoreChanged();
+ try {
+ listener.connectionStoreChanged();
+ } catch (Throwable t) {
+ RemoteConnectionsActivator.logError(t);
+ }
}
}
@@ -451,7 +455,11 @@
if (listeners == null)
return;
for (IConnectionsManagerListener listener : listeners) {
- listener.displayChanged();
+ try {
+ listener.displayChanged();
+ } catch (Throwable t) {
+ RemoteConnectionsActivator.logError(t);
+ }
}
}
@@ -494,7 +502,11 @@
if (connectionListeners == null)
return;
for (IConnectionListener listener : connectionListeners) {
- listener.connectionAdded(connection);
+ try {
+ listener.connectionAdded(connection);
+ } catch (Throwable t) {
+ RemoteConnectionsActivator.logError(t);
+ }
}
}
@@ -502,7 +514,11 @@
if (connectionListeners == null)
return;
for (IConnectionListener listener : connectionListeners) {
- listener.connectionRemoved(connection);
+ try {
+ listener.connectionRemoved(connection);
+ } catch (Throwable t) {
+ RemoteConnectionsActivator.logError(t);
+ }
}
}
@@ -510,12 +526,15 @@
if (connectionListeners == null)
return;
for (IConnectionListener listener : connectionListeners) {
- listener.currentConnectionSet(connection);
+ try {
+ listener.currentConnectionSet(connection);
+ } catch (Throwable t) {
+ RemoteConnectionsActivator.logError(t);
+ }
}
}
public ISelectedConnectionInfo ensureConnection(String id, IService service) throws CoreException {
- Check.checkArg(service);
final boolean wasCurrentConnection = CURRENT_CONNECTION_ID.equals(id);
final IConnection[] connectionHolder = { findConnection(id) };
final String[] storableIdHolder = { id };
@@ -566,7 +585,7 @@
private boolean isCompatibleConnection(IConnection connection, IService service) {
if (connection == null)
return false;
- return getCompatibleServices(connection.getConnectionType()).contains(service);
+ return service == null || getCompatibleServices(connection.getConnectionType()).contains(service);
}
public void setCurrentConnection(IConnection connection) {
diff -r c4e41d93d2ed -r ab85ee3ba586 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ClientServiceSiteUI2.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ClientServiceSiteUI2.java Thu Jul 01 13:27:31 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ClientServiceSiteUI2.java Thu Jul 01 13:28:31 2010 -0500
@@ -66,7 +66,6 @@
private Map