1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 15:45:25 +02:00

[168977][api][refactor] - stage 2.7

- moved ISystemRegistryUI.updateHost to ISystemRegistry.
This commit is contained in:
David Dykstal 2007-03-27 18:42:44 +00:00
parent f4e0d37785
commit 9c0c8ae2e6
3 changed files with 28 additions and 31 deletions

View file

@ -543,6 +543,33 @@ public interface ISystemRegistry extends ISchedulingRule {
*/
public IHost createHost(String systemType, String connectionName, String hostAddress, String description) throws Exception;
/**
* Update an existing host given the new information.
* This method:
* <ul>
* <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 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 host obsolete.
* </ul>
* <p>
* @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 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
*/
public void updateHost(IHost host, String systemType, String connectionName,
String hostName, String description,
String defaultUserId, int defaultUserIdLocation);
/**
* Creates subsystems for a given host and subsystem configurations.
* @param host the host.

View file

@ -15,7 +15,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;
@ -24,33 +23,6 @@ import org.eclipse.swt.dnd.Clipboard;
*/
public interface ISystemRegistryUI extends ISystemRegistry {
/**
* Update an existing host given the new information.
* This method:
* <ul>
* <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 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 host obsolete.
* </ul>
* <p>
* @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 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
*/
public void updateHost(IHost host, String systemType, String connectionName,
String hostName, String description,
String defaultUserId, int defaultUserIdLocation);
/**
* Returns the clipboard used for copy actions
*/

View file

@ -25,8 +25,6 @@ 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;
import org.eclipse.rse.model.ISystemRegistryUI;
import org.eclipse.rse.ui.RSEUIPlugin;
/**
* This is a base class to make it easier to create connector service classes.
@ -320,7 +318,7 @@ public abstract class AbstractConnectorService extends SuperAbstractConnectorSer
} else {
int whereToUpdate = IRSEUserIdConstants.USERID_LOCATION_HOST;
IHost host = subsystem.getHost();
ISystemRegistryUI sr = RSEUIPlugin.getDefault().getSystemRegistry();
ISystemRegistry sr = RSECorePlugin.getDefault().getSystemRegistry();
sr.updateHost(host, host.getSystemType(), host.getAliasName(), host.getHostName(), host.getDescription(), userId, whereToUpdate);
}
}