Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Dykstal2007-03-27 18:31:10 +0000
committerDavid Dykstal2007-03-27 18:31:10 +0000
commitf4e0d377853c912c9e28219b1946d163938a64ac (patch)
treeaddade1daa311b382758f0581a0f684bee285198
parent91db5014c0f8f172bd167cd00023d82b9406f6a4 (diff)
downloadorg.eclipse.tm-f4e0d377853c912c9e28219b1946d163938a64ac.tar.gz
org.eclipse.tm-f4e0d377853c912c9e28219b1946d163938a64ac.tar.xz
org.eclipse.tm-f4e0d377853c912c9e28219b1946d163938a64ac.zip
[168977][api][refactor] - stage 2.6
- dropped Shell parameter from ISystemRegistryUI.updateHost. This will allow updateHost to be moved to ISystemRegistry.
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java20
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemUpdateConnectionDialog.java6
-rw-r--r--rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectionPropertyPage.java6
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRegistryUI.java25
-rw-r--r--rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRegistry.java2
-rw-r--r--rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/AbstractConnectorService.java9
6 files changed, 34 insertions, 34 deletions
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java
index 8966fba78..8772d61b8 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewConnectionAdapter.java
@@ -633,13 +633,13 @@ public class SystemViewConnectionAdapter
}
else if (property.equals(ISystemPropertyConstants.P_HOSTNAME))
{
- sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(),
- original_hostName, conn.getDescription(), conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET);
+ sr.updateHost(conn, conn.getSystemType(), conn.getAliasName(), original_hostName,
+ conn.getDescription(), conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET);
}
else if (property.equals(ISystemPropertyConstants.P_DESCRIPTION))
{
- sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(),
- conn.getHostName(), original_description, conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET);
+ sr.updateHost(conn, conn.getSystemType(), conn.getAliasName(), conn.getHostName(),
+ original_description, conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET);
}
}
/**
@@ -652,8 +652,8 @@ public class SystemViewConnectionAdapter
//whereToUpdate = USERID_LOCATION_DEFAULT_SYSTEMTYPE;
String userId = data.getLocalValue(); // will be "" if !data.getIsLocal(), which results in wiping out local override
ISystemRegistryUI sr = RSEUIPlugin.getDefault().getSystemRegistry();
- sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(),
- conn.getHostName(), conn.getDescription(), userId, whereToUpdate);
+ sr.updateHost(conn, conn.getSystemType(), conn.getAliasName(), conn.getHostName(),
+ conn.getDescription(), userId, whereToUpdate);
}
/**
@@ -679,8 +679,8 @@ public class SystemViewConnectionAdapter
// defect 57739
if (!((String)value).equalsIgnoreCase(conn.getHostName()))
{
- sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(),
- (String)value, conn.getDescription(), conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET);
+ sr.updateHost(conn, conn.getSystemType(), conn.getAliasName(), (String)value,
+ conn.getDescription(), conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET);
changed_hostName = true;
}
}
@@ -690,8 +690,8 @@ public class SystemViewConnectionAdapter
// defect 57739
if (!((String)value).equalsIgnoreCase(conn.getDescription()))
{
- sr.updateHost(null, conn, conn.getSystemType(), conn.getAliasName(),
- conn.getHostName(), (String)value, conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET);
+ sr.updateHost(conn, conn.getSystemType(), conn.getAliasName(), conn.getHostName(),
+ (String)value, conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET);
changed_description = true;
}
}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemUpdateConnectionDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemUpdateConnectionDialog.java
index efbee4518..5fa6afcf4 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemUpdateConnectionDialog.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemUpdateConnectionDialog.java
@@ -121,9 +121,9 @@ public class SystemUpdateConnectionDialog extends SystemPromptDialog implements
{
IHost conn = (IHost)getInputObject();
ISystemRegistryUI sr = RSEUIPlugin.getDefault().getSystemRegistry();
- sr.updateHost( getShell(),conn,conn.getSystemType(),form.getConnectionName(),
- form.getHostName(), form.getConnectionDescription(),
- form.getDefaultUserId(), form.getUserIdLocation() );
+ sr.updateHost( conn,conn.getSystemType(),form.getConnectionName(),form.getHostName(),
+ form.getConnectionDescription(), form.getDefaultUserId(),
+ form.getUserIdLocation() );
}
return closeDialog;
}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectionPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectionPropertyPage.java
index a98eecaaf..eb7c33242 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectionPropertyPage.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemConnectionPropertyPage.java
@@ -88,9 +88,9 @@ public class SystemConnectionPropertyPage extends SystemBasePropertyPage
{
IHost conn = (IHost)getElement();
ISystemRegistryUI sr = RSEUIPlugin.getDefault().getSystemRegistry();
- sr.updateHost( getShell(),conn,conn.getSystemType(),form.getConnectionName(),
- form.getHostName(), form.getConnectionDescription(),
- form.getDefaultUserId(), form.getUserIdLocation() );
+ sr.updateHost( conn,conn.getSystemType(),form.getConnectionName(),form.getHostName(),
+ form.getConnectionDescription(), form.getDefaultUserId(),
+ form.getUserIdLocation() );
boolean offlineSelection = form.isWorkOffline();
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRegistryUI.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRegistryUI.java
index f0c026417..b56d01d6d 100644
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRegistryUI.java
+++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/ISystemRegistryUI.java
@@ -18,7 +18,6 @@ package org.eclipse.rse.model;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.widgets.Shell;
/**
* Registry or front door for all remote system connections.
@@ -26,31 +25,31 @@ import org.eclipse.swt.widgets.Shell;
public interface ISystemRegistryUI extends ISystemRegistry {
/**
- * Update an existing connection given the new information.
+ * Update an existing host given the new information.
* This method:
* <ul>
- * <li>calls the setXXX methods on the given connection object, updating the information in it.
- * <li>save the connection's connection pool to disk
+ * <li>calls the setXXX methods on the given host object, updating the information in it.
+ * <li>save the host's host pool to disk
* <li>fires an ISystemResourceChangeEvent event of type EVENT_CHANGE to all registered listeners
- * <li>if the systemtype or hostname is changed, calls disconnect on each associated subsystem.
- * We must do this because a hostname changes fundamentally affects the connection,
+ * <li>if the system type or host name is changed, calls disconnect on each associated subsystem.
+ * We must do this because a host name changes fundamentally affects the connection,
* rendering any information currently displayed under
- * that connection obsolete. That is, the user will have to reconnect.
+ * that host obsolete.
* </ul>
* <p>
- * @param conn SystemConnection to be updated
+ * @param host the host to be updated
* @param systemType system type matching one of the system type names defined via the
* systemTypes extension point.
* @param connectionName unique connection name.
* @param hostName ip name of host.
- * @param description optional description of the connection. Can be null.
+ * @param description optional description of the host. Can be null.
+ * @param defaultUserId userId to use as the default for the subsystems under this host.
* @param defaultUserIdLocation one of the constants in {@link org.eclipse.rse.core.IRSEUserIdConstants}
* that tells us where to set the user Id
- * @param defaultUserId userId to use as the default for the subsystems.
*/
- public void updateHost(Shell shell, IHost conn, String systemType,
- String connectionName, String hostName,
- String description,String defaultUserId, int defaultUserIdLocation);
+ public void updateHost(IHost host, String systemType, String connectionName,
+ String hostName, String description,
+ String defaultUserId, int defaultUserIdLocation);
/**
* Returns the clipboard used for copy actions
diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRegistry.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRegistry.java
index c983fa4be..93bfe7f71 100644
--- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRegistry.java
+++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRegistry.java
@@ -2495,7 +2495,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven
* @param defaultUserIdLocation one of the constants in {@link org.eclipse.rse.core.IRSEUserIdConstants}
* that tells us where to set the user Id
*/
- public void updateHost(Shell shell, IHost conn, String systemType, String connectionName, String hostName, String description, String defaultUserId, int defaultUserIdLocation)
+ public void updateHost(IHost conn, String systemType, String connectionName, String hostName, String description, String defaultUserId, int defaultUserIdLocation)
{
lastException = null;
boolean connectionNameChanged = !connectionName.equalsIgnoreCase(conn.getAliasName());
diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/AbstractConnectorService.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/AbstractConnectorService.java
index 816f83d59..558d2e630 100644
--- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/AbstractConnectorService.java
+++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/AbstractConnectorService.java
@@ -21,6 +21,7 @@ import java.util.List;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.rse.core.IRSEUserIdConstants;
import org.eclipse.rse.core.PasswordPersistenceManager;
+import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.core.model.SystemSignonInformation;
@@ -261,7 +262,7 @@ public abstract class AbstractConnectorService extends SuperAbstractConnectorSer
private void updatePasswordForOtherSystemsInConnection(String uid, String password, boolean persist) {
IHost connection = getPrimarySubSystem().getHost();
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
+ ISystemRegistry registry = RSECorePlugin.getDefault().getSystemRegistry();
ISubSystem[] subsystems = registry.getSubSystems(connection);
List uniqueSystems = new ArrayList();
for (int i = 0; i < subsystems.length; i++) {
@@ -287,7 +288,7 @@ public abstract class AbstractConnectorService extends SuperAbstractConnectorSer
private void clearPasswordForOtherSystemsInConnection(String uid, boolean persist) {
if (uid != null) {
IHost connection = getHost();
- ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
+ ISystemRegistry registry = RSECorePlugin.getDefault().getSystemRegistry();
ISubSystem[] subsystems = registry.getSubSystems(connection);
List uniqueSystems = new ArrayList();
for (int i = 0; i < subsystems.length; i++) {
@@ -319,8 +320,8 @@ public abstract class AbstractConnectorService extends SuperAbstractConnectorSer
} else {
int whereToUpdate = IRSEUserIdConstants.USERID_LOCATION_HOST;
IHost host = subsystem.getHost();
- ISystemRegistryUI sr = RSEUIPlugin.getTheSystemRegistry();
- sr.updateHost(null, host, host.getSystemType(), host.getAliasName(), host.getHostName(), host.getDescription(), userId, whereToUpdate);
+ ISystemRegistryUI sr = RSEUIPlugin.getDefault().getSystemRegistry();
+ sr.updateHost(host, host.getSystemType(), host.getAliasName(), host.getHostName(), host.getDescription(), userId, whereToUpdate);
}
}
} \ No newline at end of file

Back to the top