From f501ac6de3622b06dddcdb04dfbac862131304c5 Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Tue, 3 Apr 2007 11:13:35 +0000 Subject: [PATCH] [175262][api] IHost.getSystemType() should return IRSESystemType --- .../dstore/DStoreConnectorService.java | 11 +- .../org/eclipse/rse/core/model/DummyHost.java | 83 +++----- .../src/org/eclipse/rse/core/model/Host.java | 192 ++++++++---------- .../src/org/eclipse/rse/core/model/IHost.java | 79 ++++--- .../core/model/SystemSignonInformation.java | 5 +- .../subsystems/AbstractConnectorService.java | 5 +- .../AuthenticatingConnectorService.java | 12 +- .../core/subsystems/IConnectorService.java | 5 +- .../core/subsystems/RemoteServerLauncher.java | 5 +- .../persistence/dom/RSEDOMExporter.java | 6 +- .../resources/SystemEditableRemoteFile.java | 12 +- .../ui/resources/SystemTempFileListener.java | 6 +- .../SystemUniversalTempFileListener.java | 6 +- .../UniversalFileTransferUtility.java | 21 +- .../FileServicesPropertyPage.java | 6 +- .../ui/view/SystemViewRemoteFileAdapter.java | 6 +- .../ProcessServicesPropertyPage.java | 6 +- .../ShellServicesPropertyPage.java | 8 +- .../shells/ui/view/CommandsViewPage.java | 11 +- .../ui/view/SystemCommandsViewPart.java | 8 +- .../rse/shells/ui/RemoteCommandHelpers.java | 5 +- .../CommandEntryContentAssistProcessor.java | 5 +- .../shells/core/model/RemoteCommandShell.java | 6 +- .../ShellServiceSubSystem.java | 8 +- .../ui/actions/SystemConnectAction.java | 6 +- .../ui/actions/SystemWorkOfflineAction.java | 6 +- .../dialogs/SystemUpdateConnectionDialog.java | 6 +- .../SystemConnectionPropertyPage.java | 8 +- .../ui/view/SystemViewConnectionAdapter.java | 23 ++- .../ui/view/SystemViewDataDragAdapter.java | 6 +- .../eclipse/rse/ui/RSESystemTypeAdapter.java | 6 +- .../eclipse/rse/ui/SystemConnectionForm.java | 3 +- .../actions/SystemCopyToClipboardAction.java | 6 +- .../propertypages/ServicesPropertyPage.java | 11 +- .../ui/view/AbstractSystemViewAdapter.java | 8 +- .../ui/widgets/EnvironmentVariablesForm.java | 11 +- .../wizards/SubSystemServiceWizardPage.java | 3 +- .../RSEMainNewConnectionWizard.java | 4 +- .../rse/internal/model/SystemHostPool.java | 12 +- .../org/eclipse/rse/model/SystemRegistry.java | 17 +- .../rse/core/subsystems/SubSystem.java | 9 +- .../subsystems/SubSystemConfiguration.java | 5 +- .../StandardCredentialsProvider.java | 7 +- .../rse/core/SystemRemoteObjectMatcher.java | 8 +- .../subsystems/files/FileServiceTest.java | 4 +- 45 files changed, 336 insertions(+), 350 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java index e1e3e0fb42d..0fd64adf5d7 100644 --- a/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java +++ b/rse/plugins/org.eclipse.rse.connectorservice.dstore/src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2007 IBM Corporation. All rights reserved. + * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -12,6 +12,7 @@ * * Contributors: * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.connectorservice.dstore; @@ -1299,7 +1300,7 @@ public class DStoreConnectorService extends StandardConnectorService implements // // really authenticate with the remote system and this would be deceiving // // for the end user // -// if (getPrimarySubSystem().getHost().getSystemType().equals(IRSESystemType.SYSTEMTYPE_WINDOWS)) +// if (getPrimarySubSystem().getHost().getSystemType().getName().equals(IRSESystemType.SYSTEMTYPE_WINDOWS)) // { // String userid = getPrimarySubSystem().getUserId(); // if (userid == null) @@ -1323,7 +1324,7 @@ public class DStoreConnectorService extends StandardConnectorService implements // { // // For Windows we never prompt for userid / password so we don't need // // to clear the password cache -// if (getPrimarySubSystem().getHost().getSystemType().equals(IRSESystemType.SYSTEMTYPE_WINDOWS)) +// if (getPrimarySubSystem().getHost().getSystemType().getName().equals(IRSESystemType.SYSTEMTYPE_WINDOWS)) // { // return false; // } @@ -1349,7 +1350,7 @@ public class DStoreConnectorService extends StandardConnectorService implements public boolean supportsPassword() { boolean result = super.supportsPassword(); IHost host = getHost(); - String systemType = host.getSystemType(); + String systemType = host.getSystemType().getName(); if (systemType.equals(IRSESystemType.SYSTEMTYPE_WINDOWS)) { result = false; } @@ -1362,7 +1363,7 @@ public class DStoreConnectorService extends StandardConnectorService implements public boolean supportsUserId() { boolean result = super.supportsUserId(); IHost host = getHost(); - String systemType = host.getSystemType(); + String systemType = host.getSystemType().getName(); if (systemType.equals(IRSESystemType.SYSTEMTYPE_WINDOWS)) { result = false; } diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/DummyHost.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/DummyHost.java index a2429bc5263..e561ade0954 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/DummyHost.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/DummyHost.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,113 +11,103 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.core.model; import org.eclipse.core.runtime.PlatformObject; +import org.eclipse.rse.core.IRSESystemType; import org.eclipse.rse.core.subsystems.IConnectorService; import org.eclipse.rse.core.subsystems.ISubSystem; public class DummyHost extends PlatformObject implements IHost { protected String _hostName; - protected String _systemType; + protected IRSESystemType _systemType; - public DummyHost(String hostName, String systemType) + /** + * Constructor. + * @param hostName name of the dummy host + * @param systemType sytem type. May be null. + */ + public DummyHost(String hostName, IRSESystemType systemType) { _hostName = hostName; _systemType = systemType; } public ISystemProfile getSystemProfile() { - // TODO Auto-generated method stub return null; } public String getSystemProfileName() { - // TODO Auto-generated method stub return null; } public void setHostPool(ISystemHostPool pool) { - // TODO Auto-generated method stub - + //Auto-generated method stub } public ISystemHostPool getHostPool() { - // TODO Auto-generated method stub return null; } public ISubSystem[] getSubSystems() { - // TODO Auto-generated method stub return null; } - - public String getLocalDefaultUserId() { - // TODO Auto-generated method stub return null; } public void clearLocalDefaultUserId() { - // TODO Auto-generated method stub - + //Auto-generated method stub } public void deletingHost() { - // TODO Auto-generated method stub - + //Auto-generated method stub } public void renamingSystemProfile(String oldName, String newName) { - // TODO Auto-generated method stub - + //Auto-generated method stub } public boolean getForceUserIdToUpperCase() { - // TODO Auto-generated method stub return false; } public boolean compareUserIds(String userId1, String userId2) { - // TODO Auto-generated method stub return false; } - public String getSystemType() + public IRSESystemType getSystemType() { return _systemType; } - public void setSystemType(String value) + public void setSystemType(IRSESystemType value) { - // TODO Auto-generated method stub - + //Auto-generated method stub } public String getAliasName() { - // TODO Auto-generated method stub return null; } public void setAliasName(String value) { - // TODO Auto-generated method stub - + //Auto-generated method stub } public String getHostName() @@ -127,141 +117,118 @@ public class DummyHost extends PlatformObject implements IHost public void setHostName(String value) { - // TODO Auto-generated method stub - + //Auto-generated method stub } public String getDescription() { - // TODO Auto-generated method stub return null; } public void setDescription(String value) { - // TODO Auto-generated method stub - + //Auto-generated method stub } public String getDefaultUserId() { - // TODO Auto-generated method stub return null; } public void setDefaultUserId(String value) { - // TODO Auto-generated method stub - + //Auto-generated method stub } public boolean isPromptable() { - // TODO Auto-generated method stub return false; } public void setPromptable(boolean value) { - // TODO Auto-generated method stub - + //Auto-generated method stub } public boolean isOffline() { - // TODO Auto-generated method stub return false; } public void setOffline(boolean value) { - // TODO Auto-generated method stub - + //Auto-generated method stub } public IConnectorService[] getConnectorServices() { - // TODO Auto-generated method stub return null; } public String getName() { - // TODO Auto-generated method stub return null; } public IPropertySet[] getPropertySets() { - // TODO Auto-generated method stub return null; } public IPropertySet getPropertySet(String name) { - // TODO Auto-generated method stub return null; } public IPropertySet createPropertySet(String name, String description) { - // TODO Auto-generated method stub return null; } public IPropertySet createPropertySet(String name) { - // TODO Auto-generated method stub return null; } public boolean addPropertySet(IPropertySet set) { - // TODO Auto-generated method stub return false; } public boolean addPropertySets(IPropertySet[] sets) { - // TODO Auto-generated method stub return false; } public boolean removePropertySet(String name) { - // TODO Auto-generated method stub return false; } public boolean isDirty() { - // TODO Auto-generated method stub return false; } public void setDirty(boolean flag) { - // TODO Auto-generated method stub - + //Auto-generated method stub } public boolean commit() { - // TODO Auto-generated method stub return false; } public boolean wasRestored() { - // TODO Auto-generated method stub return false; } public void setWasRestored(boolean flag) { - // TODO Auto-generated method stub - + //Auto-generated method stub } } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/Host.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/Host.java index dbf4f238cdc..4173ecceda3 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/Host.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/Host.java @@ -15,6 +15,7 @@ * - moved SystemsPreferencesManager to a new plugin * Uwe Stieber (Wind River) - Dynamic system type provider extensions. * - Moved to package org.eclipse.rse.model for being extendable. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.core.model; @@ -36,7 +37,6 @@ import org.eclipse.rse.core.subsystems.ISubSystem; */ public class Host extends RSEModelObject implements IHost { - private boolean ucId = true; private boolean userIdCaseSensitive = true; private ISystemHostPool pool; @@ -45,7 +45,7 @@ public class Host extends RSEModelObject implements IHost { /** * The system type which is associated to this IHost object. */ - private String systemType = null; + private IRSESystemType systemType = null; /** * The alias name of this IHost object. @@ -90,43 +90,42 @@ public class Host extends RSEModelObject implements IHost { _profile = profile; } - /** - * Set the parent connection pool this is owned by. - * Connection pools are internal management objects, one per profile. + /* + * (non-Javadoc) + * @see org.eclipse.rse.core.model.IHost#setHostPool(org.eclipse.rse.core.model.ISystemHostPool) */ public void setHostPool(ISystemHostPool pool) { this.pool = pool; previousUserIdKey = getPreferencesKey(); } - /** - * Set the parent connection pool this is owned by. - * Connection pools are internal management objects, one per profile. + /* + * (non-Javadoc) + * @see org.eclipse.rse.core.model.IHost#getHostPool() */ public ISystemHostPool getHostPool() { return pool; } - /** - * Return all the connector services provided for this host + /* + * (non-Javadoc) + * @see org.eclipse.rse.core.model.IHost#getConnectorServices() */ public IConnectorService[] getConnectorServices() { return RSECorePlugin.getDefault().getSystemRegistry().getConnectorServices(this); } - /** - * Return the subsystem instances under this connection.
- * Just a shortcut to {@link org.eclipse.rse.core.model.ISystemRegistry#getSubSystems(IHost)} + /* + * (non-Javadoc) + * @see org.eclipse.rse.core.model.IHost#getSubSystems() */ public ISubSystem[] getSubSystems() { return RSECorePlugin.getDefault().getSystemRegistry().getSubSystems(this); } - /** - * Private method called when this connection is being deleted, so - * we can do any pre-death cleanup we need. - *

- * What we need to do is delete our entry in the preference store for our default userId. + /* + * (non-Javadoc) + * @see org.eclipse.rse.core.model.IHost#deletingHost() */ public void deletingHost() { String oldUserId = null; @@ -139,11 +138,9 @@ public class Host extends RSEModelObject implements IHost { } } - /** - * Private method called when this connection's profile is being rename, so - * we can do any pre-death cleanup we need. - *

- * What we need to do is rename our entry in the preference store for our default userId. + /* + * (non-Javadoc) + * @see org.eclipse.rse.core.model.IHost#renamingSystemProfile(java.lang.String, java.lang.String) */ public void renamingSystemProfile(String oldName, String newName) { String userIdValue = null; @@ -159,15 +156,17 @@ public class Host extends RSEModelObject implements IHost { previousUserIdKey = newKey; } - /** - * Return the system profile that owns this connection + /* + * (non-Javadoc) + * @see org.eclipse.rse.core.model.IHost#getSystemProfile() */ public ISystemProfile getSystemProfile() { return _profile; } - /** - * Return the name of system profile that owns this connection + /* + * (non-Javadoc) + * @see org.eclipse.rse.core.model.IHost#getSystemProfileName() */ public String getSystemProfileName() { if (pool == null) @@ -203,12 +202,14 @@ public class Host extends RSEModelObject implements IHost { /** * Intercept of setSystemType so we can decide if the user ID is case sensitive */ - public void setSystemType(String systemType) { + public void setSystemType(IRSESystemType systemType) { // defect 43219 if (systemType != null) { - boolean forceUC = systemType.equals(IRSESystemType.SYSTEMTYPE_ISERIES); - boolean caseSensitiveUID = systemType.equals(IRSESystemType.SYSTEMTYPE_UNIX) || systemType.equals(IRSESystemType.SYSTEMTYPE_LINUX) - || (systemType.equals(IRSESystemType.SYSTEMTYPE_LOCAL) && !System.getProperty("os.name").toLowerCase().startsWith("windows")); //$NON-NLS-1$ //$NON-NLS-2$ + //FIXME MOB this should be in IRSESystemType.isForceUC() / IRSESystemType.isUIDCaseSensitive() + String systemTypeName = systemType.getName(); + boolean forceUC = systemTypeName.equals(IRSESystemType.SYSTEMTYPE_ISERIES); + boolean caseSensitiveUID = systemTypeName.equals(IRSESystemType.SYSTEMTYPE_UNIX) || systemTypeName.equals(IRSESystemType.SYSTEMTYPE_LINUX) + || (systemTypeName.equals(IRSESystemType.SYSTEMTYPE_LOCAL) && !System.getProperty("os.name").toLowerCase().startsWith("windows")); //$NON-NLS-1$ //$NON-NLS-2$ setForceUserIdToUpperCase(forceUC); setUserIdCaseSensitive(caseSensitiveUID); } @@ -252,25 +253,14 @@ public class Host extends RSEModelObject implements IHost { } } - /** - * Returns the default UserId for this Host. - * Note that we don't store it directly in - * the model, since we don't want the team to share it. Rather, - * we store the actual it in the preference store keyed by - * (profileName.connectionName). - *

- * Further, it is possible that there is no default UserId. If so, this - * method will go to the preference store and will try to get the default - * UserId for this connection's system type. - *

- * This is all transparent to the caller though. - *

- * @return The value of the DefaultUserId attribute + /* + * (non-Javadoc) + * @see org.eclipse.rse.core.model.IHost#getDefaultUserId() */ public String getDefaultUserId() { String uid = getLocalDefaultUserId(); if ((uid == null) || (uid.length() == 0)) { - uid = RSEPreferencesManager.getUserId(getSystemType()); // resolve from preferences + uid = RSEPreferencesManager.getUserId(getSystemType().getName()); // resolve from preferences if ((uid != null) && ucId) uid = uid.toUpperCase(); } return uid; @@ -288,20 +278,17 @@ public class Host extends RSEModelObject implements IHost { return uid; } - /** - * Return the local default user Id without resolving up the food chain. - * @see #getDefaultUserId() + /* + * (non-Javadoc) + * @see org.eclipse.rse.core.model.IHost#getLocalDefaultUserId() */ public String getLocalDefaultUserId() { return getLocalDefaultUserId(getPreferencesKey()); } - /** - * Clear the local default user Id so next query will return the value from - * the preference store. - *

- * Same as calling setDefaultUserId(null) - * @see #setDefaultUserId(String) + /* + * (non-Javadoc) + * @see org.eclipse.rse.core.model.IHost#clearLocalDefaultUserId() */ public void clearLocalDefaultUserId() { if (previousUserIdKey != null) RSEPreferencesManager.clearUserId(previousUserIdKey); @@ -394,132 +381,117 @@ public class Host extends RSEModelObject implements IHost { return getAliasName(); } - /** - * This is the method required by the IAdaptable interface. - * Given an adapter class type, return an object castable to the type, or - * null if this is not possible. + /* + * (non-Javadoc) + * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class) */ public Object getAdapter(Class adapterType) { return Platform.getAdapterManager().getAdapter(this, adapterType); } - /** - * @generated This field/method will be replaced during code generation + /* + * (non-Javadoc) + * @see org.eclipse.rse.core.model.IHost#getSystemType() */ - public String getSystemType() { + public IRSESystemType getSystemType() { return systemType; } - /** - * Returns the alias name for this host + /* + * (non-Javadoc) + * @see org.eclipse.rse.core.model.IRSEModelObject#getName() */ public String getName() { return getAliasName(); } - /** - * @generated This field/method will be replaced during code generation - * The unique key for this object. Unique per connection pool + /* + * (non-Javadoc) + * @see org.eclipse.rse.core.model.IHost#getAliasName() */ public String getAliasName() { return aliasName; } - /** - * @generated This field/method will be replaced during code generation + /* + * (non-Javadoc) + * @see org.eclipse.rse.core.model.IHost#getHostName() */ public String getHostName() { return hostName; } - /** - * @generated This field/method will be replaced during code generation + /* + * (non-Javadoc) + * @see org.eclipse.rse.core.model.RSEModelObject#getDescription() */ public String getDescription() { return description; } - /** - * @generated This field/method will be replaced during code generation. + /* + * (non-Javadoc) + * @see org.eclipse.rse.core.model.IHost#setDescription(java.lang.String) */ public void setDescription(String newDescription) { setDirty(!compareStrings(description, newDescription)); description = newDescription; } - /** - * @generated This field/method will be replaced during code generation + /* + * (non-Javadoc) + * @see org.eclipse.rse.core.model.IHost#isPromptable() */ public boolean isPromptable() { return promptable; } - /** - * @generated This field/method will be replaced during code generation. + /* + * (non-Javadoc) + * @see org.eclipse.rse.core.model.IHost#setPromptable(boolean) */ public void setPromptable(boolean newPromptable) { setDirty(promptable != newPromptable); promptable = newPromptable; } - /** - * - * Query if this connection is offline or not. It is up to each subsystem to honor this - * flag. - * - * @generated + /* + * (non-Javadoc) + * @see org.eclipse.rse.core.model.IHost#isOffline() */ public boolean isOffline() { return offline; } - /** - * - * Specify if this connection is offline or not. It is up to each subsystem to honor this - * flag. - * - * @generated + /* + * (non-Javadoc) + * @see org.eclipse.rse.core.model.IHost#setOffline(boolean) */ public void setOffline(boolean newOffline) { setDirty(offline != newOffline); offline = newOffline; } - /** - * @generated This field/method will be replaced during code generation. - */ - public void setSystemTypeGen(String newSystemType) { - setDirty(!compareStrings(systemType, newSystemType)); + private void setSystemTypeGen(IRSESystemType newSystemType) { + setDirty( systemType==null ? (newSystemType==null) : !systemType.equals(newSystemType) ); systemType = newSystemType; } - /** - * @generated This field/method will be replaced during code generation. - */ - public void setAliasNameGen(String newAliasName) { + private void setAliasNameGen(String newAliasName) { setDirty(!compareStrings(aliasName, newAliasName)); aliasName = newAliasName; } - /** - * @generated This field/method will be replaced during code generation. - */ - public void setHostNameGen(String newHostName) { + private void setHostNameGen(String newHostName) { setDirty(!compareStrings(hostName, newHostName)); hostName = newHostName; } - /** - * @generated This field/method will be replaced during code generation - */ - public String getDefaultUserIdGen() { + private String getDefaultUserIdGen() { return defaultUserId; } - /** - * @generated This field/method will be replaced during code generation. - */ - public void setDefaultUserIdGen(String newDefaultUserId) { + private void setDefaultUserIdGen(String newDefaultUserId) { setDirty(!compareStrings(defaultUserId, newDefaultUserId)); defaultUserId = newDefaultUserId; } diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IHost.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IHost.java index e2c691d109f..3b567fc2f23 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IHost.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/IHost.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,33 +11,33 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.core.model; import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.rse.core.IRSESystemType; import org.eclipse.rse.core.subsystems.IConnectorService; import org.eclipse.rse.core.subsystems.ISubSystem; /** - * Interface for SystemConnection objects. - * A SystemConnect holds information identifying a remote system. It also logically contains - * SubSystem objects, although this containment is achievable programmatically versus via - * object oriented containment. - *

- */ -/** - * @lastgen interface SystemConnection {} + * Interface for Host (SystemConnection) objects. + * + * An IHost holds information identifying a remote system. It also logically contains + * ISubSystem objects, although this containment is achievable programmatically versus via + * object oriented containment. */ public interface IHost extends IAdaptable, IRSEModelObject { /** * Return the system profile that owns this connection + * @return the profile which contains this host */ public ISystemProfile getSystemProfile(); /** * Return the name of the system profile that owns this connection + * FIXME Check how this is different from getSystemProfile().getName() */ public String getSystemProfileName(); @@ -75,77 +75,91 @@ public interface IHost extends IAdaptable, IRSEModelObject { public void clearLocalDefaultUserId(); /** - * Private method called when this connection is being deleted, so - * we can do any pre-death cleanup we need. + * Notification method called when this connection is being deleted. + * Allows doing pre-death cleanup in overriders. *

* What we need to do is delete our entry in the preference store for our default userId. */ public void deletingHost(); /** - * Private method called when this connection's profile is being rename, so - * we can do any pre-death cleanup we need. + * Notification method called when this connection's profile is being renamed. + * Allows doing pre-death cleanup in overriders. *

* What we need to do is rename our entry in the preference store for our default userId. */ public void renamingSystemProfile(String oldName, String newName); /** - * Call this to query whether the default userId is to be uppercased. + * Query whether the default userId is to be uppercased. + * @return true if the user id is to be uppercased. */ public boolean getForceUserIdToUpperCase(); /** - * Call this to compare two userIds taking case sensitivity + * Compare two userIds taking case sensitivity into account. + * @param userId1 first id to compare + * @param userId2 second id to compare */ public boolean compareUserIds(String userId1, String userId2); /** + * Get the system type. * @return The value of the SystemType attribute */ - public String getSystemType(); + public IRSESystemType getSystemType(); /** + * Set the system type. * @param value The new value of the SystemType attribute */ - public void setSystemType(String value); + public void setSystemType(IRSESystemType value); /** + * Get the unique user-visible connection name. + * This is a key that is unique per connection pool. * @return The value of the AliasName attribute - * The unique key for this object. Unique per connection pool */ public String getAliasName(); /** + * Set the unique user-visible connection name. + * This needs to be a key that is unique per connection pool. * @param value The new value of the AliasName attribute */ public void setAliasName(String value); /** + * Get the host name or IP address. * @return The value of the HostName attribute */ public String getHostName(); /** + * Set the host name or IP address. * @param value The new value of the HostName attribute */ public void setHostName(String value); /** + * Return the description of this host. * @return The value of the Description attribute */ public String getDescription(); /** + * Set the description of this host. * @param value The new value of the Description attribute */ public void setDescription(String value); /** - * We return the default user Id. Note that we don't store it directly in - * the mof-modelled attribute, as we don't want the team to share it. Rather, - * we store the actual user Id in the preference store keyed by this connection's - * unique name (profile.connName) and store that key in this attribute. + * Return the default user Id for this host. + * + * Note that we don't store it directly in an attribute, as we don't want + * the team to share it. The actual user Id is stored in the preference + * store keyed by this connection's unique name (profile.connName) instead, + * and that key is stored in this attribute. *

* Further, it is possible that there is no default user id. If so, this * method will go to the preference store and will try to get the default user @@ -168,37 +182,36 @@ public interface IHost extends IAdaptable, IRSEModelObject { public void setDefaultUserId(String value); /** - * @generated This field/method will be replaced during code generation + * Check if this host is promptable. * @return The value of the Promptable attribute */ boolean isPromptable(); /** - * @generated This field/method will be replaced during code generation + * Set the promptable attribute. * @param value The new value of the Promptable attribute */ void setPromptable(boolean value); /** * Returns the value of the 'Offline' attribute. - * *

- * Is this connection offline? If so, there is no live connection. Subsystems - * decide how much to enable while offline. + * Query if this connection is offline or not. + * If so, there is no live connection. Subsystems + * decide how much to enable while offline. + * It is up to each subsystem to honor this flag. *

- * * @return the value of the 'Offline' attribute. * @see #setOffline(boolean) */ boolean isOffline(); /** - * Sets the value of the '{@link org.eclipse.rse.core.model.IHost#isOffline Offline}' attribute. - * - * + * Specify if this connection is offline or not. + * It is up to each subsystem to honor this flag. + * * @param value the new value of the 'Offline' attribute. * @see #isOffline() - * @generated */ void setOffline(boolean value); diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemSignonInformation.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemSignonInformation.java index a8a1593456d..02a3ceb0cdc 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemSignonInformation.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/SystemSignonInformation.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2007 IBM Corporation. All rights reserved. + * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -12,6 +12,7 @@ * * Contributors: * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.core.model; @@ -68,6 +69,8 @@ public final class SystemSignonInformation implements ICredentials { /** * Returns the systemType of the remote system + * //FIXME should be replaced by IRSESystemType getSystemType() + * @deprecated * @return String */ public String getSystemType() { diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorService.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorService.java index 61caa04665f..fd480e2e1fd 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorService.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AbstractConnectorService.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2007 IBM Corporation. All rights reserved. + * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -12,6 +12,7 @@ * * Contributors: * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.core.subsystems; @@ -242,7 +243,7 @@ public abstract class AbstractConnectorService extends RSEModelObject implements * @see org.eclipse.rse.core.subsystems.IConnectorService#getHostType() */ public final String getHostType() { - return getHost().getSystemType(); + return getHost().getSystemType().getName(); } /* (non-Javadoc) diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AuthenticatingConnectorService.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AuthenticatingConnectorService.java index 106bf893df2..97b76d730ca 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AuthenticatingConnectorService.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/AuthenticatingConnectorService.java @@ -1,3 +1,13 @@ +/******************************************************************************** + * Copyright (c) 2007 IBM Corporation and others. All rights reserved. + * This program and the accompanying materials are made available under the terms + * of the Eclipse Public License v1.0 which accompanies this distribution, and is + * available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * David Dykstal (IBM) - initial API and implementation from AbstractConnectorService. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType + ********************************************************************************/ package org.eclipse.rse.core.subsystems; import java.util.ArrayList; @@ -245,7 +255,7 @@ public abstract class AuthenticatingConnectorService extends AbstractConnectorSe int whereToUpdate = IRSEUserIdConstants.USERID_LOCATION_HOST; IHost host = subsystem.getHost(); ISystemRegistry sr = RSECorePlugin.getDefault().getSystemRegistry(); - sr.updateHost(host, host.getSystemType(), host.getAliasName(), host.getHostName(), host.getDescription(), userId, whereToUpdate); + sr.updateHost(host, host.getSystemType().getName(), host.getAliasName(), host.getHostName(), host.getDescription(), userId, whereToUpdate); } } diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorService.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorService.java index 6440a2502b6..13c52f792bb 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorService.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/IConnectorService.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2007 IBM Corporation. All rights reserved. + * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -12,6 +12,7 @@ * * Contributors: * David Dykstal (IBM) - 168977: refactoring IConnectorService + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.core.subsystems; @@ -115,6 +116,8 @@ public interface IConnectorService extends IRSEModelObject { /** * @return the system type for this connection. + * //FIXME Remove this method + * @deprecated use getHost().getSystemType() instead */ public String getHostType(); diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteServerLauncher.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteServerLauncher.java index 8825f8d018f..b76f501ead8 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteServerLauncher.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/RemoteServerLauncher.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2004, 2007 IBM Corporation. All rights reserved. + * Copyright (c) 2004, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -12,6 +12,7 @@ * * Contributors: * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.core.subsystems; @@ -407,7 +408,7 @@ public class RemoteServerLauncher extends ServerLauncher implements IRemoteServe if ((serverScript == null) || (serverScript.length() == 0)) { - serverScript = "server." + getConnectorService().getHost().getSystemType().toLowerCase(); //$NON-NLS-1$ + serverScript = "server." + getConnectorService().getHost().getSystemType().getName().toLowerCase(); //$NON-NLS-1$ } return serverScript; diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMExporter.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMExporter.java index f1271e4fc38..6f6d3129d10 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMExporter.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/persistence/dom/RSEDOMExporter.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,7 +11,7 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.internal.persistence.dom; @@ -286,7 +286,7 @@ public class RSEDOMExporter implements IRSEDOMExporter { RSEDOMNode node = findOrCreateNode(parent, IRSEDOMConstants.TYPE_HOST, host, clean); if (clean || node.isDirty()) { - node.addAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE, host.getSystemType()); + node.addAttribute(IRSEDOMConstants.ATTRIBUTE_TYPE, host.getSystemType().getName()); node.addAttribute(IRSEDOMConstants.ATTRIBUTE_OFFLINE, getBooleanString(host.isOffline())); node.addAttribute(IRSEDOMConstants.ATTRIBUTE_PROMPTABLE, getBooleanString(host.isPromptable())); node.addAttribute(IRSEDOMConstants.ATTRIBUTE_HOSTNAME, host.getHostName()); diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java index 8dcb5629d7e..e5fa6016d37 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,7 +11,7 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.files.ui.resources; @@ -295,7 +295,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP IHost connection = fs.getHost(); // on windows systems, we need to take into account drives and different separators - boolean isWindows = connection.getSystemType().equals("Local") || fs.getHost().getSystemType().equals("Windows"); //$NON-NLS-1$ //$NON-NLS-2$ + boolean isWindows = connection.getSystemType().getName().equals("Local") || fs.getHost().getSystemType().getName().equals("Windows"); //$NON-NLS-1$ //$NON-NLS-2$ char fileSeparator = isWindows ? '\\' : '/'; StringBuffer tempRemotePath = new StringBuffer(""); //$NON-NLS-1$ @@ -899,7 +899,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP */ public String getWorkspaceRemotePath(String remotePath) { - if (subsystem != null && subsystem.getHost().getSystemType().equals("Local")) //$NON-NLS-1$ + if (subsystem != null && subsystem.getHost().getSystemType().getName().equals("Local")) //$NON-NLS-1$ { return SystemRemoteEditManager.getDefault().getWorkspacePathFor(subsystem.getHost().getHostName(), remotePath); } @@ -909,7 +909,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP public String getActualHostFor(String remotePath) { String hostname = subsystem.getHost().getHostName(); - if (subsystem != null && subsystem.getHost().getSystemType().equals("Local")) //$NON-NLS-1$ + if (subsystem != null && subsystem.getHost().getSystemType().getName().equals("Local")) //$NON-NLS-1$ { String result = SystemRemoteEditManager.getDefault().getActualHostFor(hostname, remotePath); if (!result.equals(hostname)) @@ -1310,7 +1310,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP try { - if (remoteFile.getSystemConnection().getSystemType().equals("Local")) //$NON-NLS-1$ + if (remoteFile.getSystemConnection().getSystemType().getName().equals("Local")) //$NON-NLS-1$ { // Open local files "in-place", i.e. don't copy them to the // RemoteSystemsTempFiles project first diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java index 52751779183..69e0f7a0c24 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,7 +11,7 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.files.ui.resources; @@ -526,7 +526,7 @@ public abstract class SystemTempFileListener implements IResourceChangeListener IHost connection = fs.getHost(); // on windows systems, we need to take into account drives and different separators - boolean isWindows = connection.getSystemType().equals("Local") || fs.getHost().getSystemType().equals("Windows"); //$NON-NLS-1$ //$NON-NLS-2$ + boolean isWindows = connection.getSystemType().getName().equals("Local") || fs.getHost().getSystemType().getName().equals("Windows"); //$NON-NLS-1$ //$NON-NLS-2$ char fileSeparator = isWindows ? '\\' : '/'; StringBuffer remotePath = new StringBuffer(""); //$NON-NLS-1$ diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java index 9c4ea2fea0c..fb05070d5e9 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemUniversalTempFileListener.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,7 +11,7 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.files.ui.resources; @@ -132,7 +132,7 @@ public class SystemUniversalTempFileListener extends SystemTempFileListener else { // for mounting... - if (fs.getHost().getSystemType().equals("Local")) //$NON-NLS-1$ + if (fs.getHost().getSystemType().getName().equals("Local")) //$NON-NLS-1$ { boolean isMounted = properties.getRemoteFileMounted(); if (isMounted) diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java index 4f2dc1bdad2..4fb5854b693 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2006 IBM Corporation and others. All rights reserved. + * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -12,6 +12,7 @@ * * Contributors: * Michael Scharf (Wind River) - Fix 163844: InvalidThreadAccess in checkForCollision + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.files.ui.resources; @@ -345,7 +346,7 @@ public class UniversalFileTransferUtility IResource tempFolder = null; if (doCompressedTransfer && doSuperTransferProperty && !srcFileOrFolder.isRoot() - && !(srcFileOrFolder.getParentRemoteFileSubSystem().getHost().getSystemType().equals("Local"))) //$NON-NLS-1$ + && !(srcFileOrFolder.getParentRemoteFileSubSystem().getHost().getSystemType().getName().equals("Local"))) //$NON-NLS-1$ { try { @@ -766,7 +767,7 @@ public class UniversalFileTransferUtility boolean doSuperTransferProperty = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemFilePreferencesConstants.DOSUPERTRANSFER); if (doCompressedTransfer && doSuperTransferProperty && !srcFileOrFolder.isRoot() - && !(srcFileOrFolder.getParentRemoteFileSubSystem().getHost().getSystemType().equals("Local"))) //$NON-NLS-1$ + && !(srcFileOrFolder.getParentRemoteFileSubSystem().getHost().getSystemType().getName().equals("Local"))) //$NON-NLS-1$ { try { @@ -869,7 +870,7 @@ public class UniversalFileTransferUtility { IHost connection = connections[i]; IRemoteFileSubSystem anFS = RemoteFileUtility.getFileSubSystem(connection); - if (anFS.getHost().getSystemType().equals("Local")) //$NON-NLS-1$ + if (anFS.getHost().getSystemType().getName().equals("Local")) //$NON-NLS-1$ { return anFS; } @@ -1084,7 +1085,7 @@ public class UniversalFileTransferUtility } - boolean isTargetLocal = newTargetFolder.getParentRemoteFileSubSystem().getHost().getSystemType().equals("Local"); //$NON-NLS-1$ + boolean isTargetLocal = newTargetFolder.getParentRemoteFileSubSystem().getHost().getSystemType().getName().equals("Local"); //$NON-NLS-1$ boolean destInArchive = (newTargetFolder instanceof IVirtualRemoteFile) || newTargetFolder.isArchive(); if (doCompressedTransfer && doSuperTransferPreference && !destInArchive && !isTargetLocal) @@ -1295,7 +1296,7 @@ public class UniversalFileTransferUtility directory.refreshLocal(IResource.DEPTH_ONE, monitor); - boolean isTargetLocal = newTargetFolder.getParentRemoteFileSubSystem().getHost().getSystemType().equals("Local"); //$NON-NLS-1$ + boolean isTargetLocal = newTargetFolder.getParentRemoteFileSubSystem().getHost().getSystemType().getName().equals("Local"); //$NON-NLS-1$ boolean destInArchive = (newTargetFolder instanceof IVirtualRemoteFile) || newTargetFolder.isArchive(); boolean doSuperTransferPreference = RSEUIPlugin.getDefault().getPreferenceStore().getBoolean(ISystemFilePreferencesConstants.DOSUPERTRANSFER); @@ -1702,7 +1703,7 @@ public class UniversalFileTransferUtility path = path.append(separator + actualHost + separator); String absolutePath = srcFileOrFolder.getAbsolutePath(); - if (srcFileOrFolder.getSystemConnection().getSystemType().equals("Local")) //$NON-NLS-1$ + if (srcFileOrFolder.getSystemConnection().getSystemType().getName().equals("Local")) //$NON-NLS-1$ { absolutePath = editMgr.getWorkspacePathFor(actualHost, srcFileOrFolder.getAbsolutePath()); } @@ -1882,7 +1883,7 @@ public class UniversalFileTransferUtility public static String getActualHostFor(ISubSystem subsystem, String remotePath) { String hostname = subsystem.getHost().getHostName(); - if (subsystem.getHost().getSystemType().equals("Local")) //$NON-NLS-1$ + if (subsystem.getHost().getSystemType().getName().equals("Local")) //$NON-NLS-1$ { String result = SystemRemoteEditManager.getDefault().getActualHostFor(hostname, remotePath); return result; @@ -1916,7 +1917,7 @@ public class UniversalFileTransferUtility protected static boolean isRemoteFileMounted(ISubSystem subsystem, String remotePath) { String hostname = subsystem.getHost().getHostName(); - if (subsystem.getHost().getSystemType().equals("Local")) //$NON-NLS-1$ + if (subsystem.getHost().getSystemType().getName().equals("Local")) //$NON-NLS-1$ { String result = SystemRemoteEditManager.getDefault().getActualHostFor(hostname, remotePath); if (!result.equals(hostname)) @@ -1940,7 +1941,7 @@ public class UniversalFileTransferUtility protected static String getWorkspaceRemotePath(ISubSystem subsystem, String remotePath) { - if (subsystem != null && subsystem.getHost().getSystemType().equals("Local")) { //$NON-NLS-1$ + if (subsystem != null && subsystem.getHost().getSystemType().getName().equals("Local")) { //$NON-NLS-1$ return SystemRemoteEditManager.getDefault().getWorkspacePathFor(subsystem.getHost().getHostName(), remotePath); } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/FileServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/FileServicesPropertyPage.java index 68c5eda284f..4fed4cd5929 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/FileServicesPropertyPage.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/propertypages/FileServicesPropertyPage.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,7 +11,7 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.internal.files.ui.propertypages; @@ -47,7 +47,7 @@ public class FileServicesPropertyPage extends ServicesPropertyPage IHost host = subSystem.getHost(); _currentFactory = (IFileServiceSubSystemConfiguration)subSystem.getParentRemoteFileSubSystemConfiguration(); - IFileServiceSubSystemConfiguration[] factories = getFileServiceSubSystemFactories(host.getSystemType()); + IFileServiceSubSystemConfiguration[] factories = getFileServiceSubSystemFactories(host.getSystemType().getName()); // create elements for each diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java index 776f3b8850b..70770a8d03d 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,7 +11,7 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.internal.files.ui.view; @@ -1496,7 +1496,7 @@ public class SystemViewRemoteFileAdapter { IHost connection = connections[i]; IRemoteFileSubSystem anFS = RemoteFileUtility.getFileSubSystem(connection); - if ((anFS != null) && (anFS.getHost().getSystemType().equals("Local"))) //$NON-NLS-1$ + if ((anFS != null) && (anFS.getHost().getSystemType().getName().equals("Local"))) //$NON-NLS-1$ { return anFS; } diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/propertypages/ProcessServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/propertypages/ProcessServicesPropertyPage.java index 00fbfb252d0..1ff4a9897fc 100644 --- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/propertypages/ProcessServicesPropertyPage.java +++ b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/propertypages/ProcessServicesPropertyPage.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,7 +11,7 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.internal.processes.ui.propertypages; @@ -45,7 +45,7 @@ public class ProcessServicesPropertyPage extends ServicesPropertyPage IHost host = subSystem.getHost(); _currentFactory = (IProcessServiceSubSystemConfiguration)subSystem.getParentRemoteProcessSubSystemConfiguration(); - IProcessServiceSubSystemConfiguration[] factories = getProcessServiceSubSystemFactories(host.getSystemType()); + IProcessServiceSubSystemConfiguration[] factories = getProcessServiceSubSystemFactories(host.getSystemType().getName()); // create elements for each diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/propertypages/ShellServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/propertypages/ShellServicesPropertyPage.java index c8574be9302..ccb05720475 100644 --- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/propertypages/ShellServicesPropertyPage.java +++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/propertypages/ShellServicesPropertyPage.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,7 +11,7 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.internal.shells.ui.propertypages; @@ -52,14 +52,14 @@ public class ShellServicesPropertyPage extends ServicesPropertyPage if (subSystem == null || _currentFactory != null) { // create dummy host - factories = getShellServiceSubSystemFactories(getSystemType()); + factories = getShellServiceSubSystemFactories(getSystemType().getName()); host = new DummyHost(getHostname(), getSystemType()); } else { host = subSystem.getHost(); _currentFactory = (IShellServiceSubSystemConfiguration)subSystem.getParentRemoteCmdSubSystemConfiguration(); - factories = getShellServiceSubSystemFactories(host.getSystemType()); + factories = getShellServiceSubSystemFactories(host.getSystemType().getName()); } // create elements for each diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/CommandsViewPage.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/CommandsViewPage.java index f70545feead..42ceaa1988d 100644 --- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/CommandsViewPage.java +++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/CommandsViewPage.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation and others. All rights reserved. + * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -12,6 +12,7 @@ * * Contributors: * Martin Oberhuber (Wind River) - Fix 154874 - handle files with space or $ in the name + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.internal.shells.ui.view; @@ -374,9 +375,9 @@ FocusListener ISubSystem cmdSubSystem = adapter.getSubSystem(element); String cdCmd = "cd " + PathUtility.enQuoteUnix(path); //$NON-NLS-1$ - if (cmdSubSystem.getHost().getSystemType().equals("Local") //$NON-NLS-1$ + if (cmdSubSystem.getHost().getSystemType().getName().equals("Local") //$NON-NLS-1$ && System.getProperty("os.name").toLowerCase().startsWith("win") //$NON-NLS-1$ //$NON-NLS-2$ - || cmdSubSystem.getHost().getSystemType().equals("Windows")) //$NON-NLS-1$ + || cmdSubSystem.getHost().getSystemType().getName().equals("Windows")) //$NON-NLS-1$ { cdCmd = "cd /d \"" + path + '\"'; //$NON-NLS-1$ } @@ -393,9 +394,9 @@ FocusListener ISubSystem cmdSubSystem = adapter.getSubSystem(element); String cdCmd = "cd " + PathUtility.enQuoteUnix(path); //$NON-NLS-1$ - if (cmdSubSystem.getHost().getSystemType().equals("Local") //$NON-NLS-1$ + if (cmdSubSystem.getHost().getSystemType().getName().equals("Local") //$NON-NLS-1$ && System.getProperty("os.name").toLowerCase().startsWith("win") //$NON-NLS-1$ //$NON-NLS-2$ - || cmdSubSystem.getHost().getSystemType().equals("Windows")) //$NON-NLS-1$ + || cmdSubSystem.getHost().getSystemType().getName().equals("Windows")) //$NON-NLS-1$ { cdCmd = "cd /d \"" + path + '\"'; //$NON-NLS-1$ } diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsViewPart.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsViewPart.java index 56924ccb087..5d8382051ae 100644 --- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsViewPart.java +++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/internal/shells/ui/view/SystemCommandsViewPart.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,7 +11,7 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.internal.shells.ui.view; @@ -518,7 +518,7 @@ public class SystemCommandsViewPart for (int i = 0; i < connections.length; i++) { IHost connection = connections[i]; - if (registry.isAnySubSystemConnected(connection) || connection.getSystemType().equals("Local")) //$NON-NLS-1$ + if (registry.isAnySubSystemConnected(connection) || connection.getSystemType().getName().equals("Local")) //$NON-NLS-1$ { IRemoteCmdSubSystem[] cmdSubSystems = RemoteCommandHelpers.getCmdSubSystems(connection); if (cmdSubSystems.length == 1) @@ -645,7 +645,7 @@ public class SystemCommandsViewPart for (int i = 0; i < connections.length; i++) { IHost connection = connections[i]; - if (registry.isAnySubSystemConnected(connection) || connection.getSystemType().equals("Local")) //$NON-NLS-1$ + if (registry.isAnySubSystemConnected(connection) || connection.getSystemType().getName().equals("Local")) //$NON-NLS-1$ { IRemoteCmdSubSystem[] cmdSubSystems = RemoteCommandHelpers.getCmdSubSystems(connection); if (cmdSubSystems.length > 0) diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/RemoteCommandHelpers.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/RemoteCommandHelpers.java index 5df6070e047..3f287266b80 100644 --- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/RemoteCommandHelpers.java +++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/RemoteCommandHelpers.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation and others. All rights reserved. + * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -12,6 +12,7 @@ * * Contributors: * Martin Oberhuber (Wind River) - Fix 154874 - handle files with space or $ in the name + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.shells.ui; @@ -139,7 +140,7 @@ public class RemoteCommandHelpers showInView(defaultShell, isCompile, cmdString); - IRemoteFileSubSystemConfiguration fileSSF = RemoteFileUtility.getFileSubSystemConfiguration(cmdSubSystem.getHost().getSystemType()); + IRemoteFileSubSystemConfiguration fileSSF = RemoteFileUtility.getFileSubSystemConfiguration(cmdSubSystem.getHost().getSystemType().getName()); IRemoteFile pwd = ((RemoteCommandShell)defaultShell).getWorkingDirectory(); if (pwd == null || !pwd.getAbsolutePath().equals(path)) { diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryContentAssistProcessor.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryContentAssistProcessor.java index 5484825e870..51f5cecdc1e 100644 --- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryContentAssistProcessor.java +++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryContentAssistProcessor.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation and others. All rights reserved. + * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -12,6 +12,7 @@ * * Contributors: * Martin Oberhuber (Wind River) - fix 158766: content assist works 1st time only + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.shells.ui.view; @@ -138,7 +139,7 @@ public class CommandEntryContentAssistProcessor implements IContentAssistProcess if (_remoteCommand != null) { RemoteCmdSubSystem cmdSubsystem = (RemoteCmdSubSystem) _remoteCommand.getCommandSubSystem(); - //String type = cmdSubsystem.getHost().getSystemType(); + //String type = cmdSubsystem.getHost().getSystemType().getName(); if (cmdSubsystem.isWindows()) { _isWindows = true; diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShell.java index cd841379d61..03f9190194a 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShell.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandShell.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,7 +11,7 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.subsystems.shells.core.model; @@ -278,7 +278,7 @@ public abstract class RemoteCommandShell implements IAdaptable, IRemoteCommandSh protected boolean isWindows() { - String type = getCommandSubSystem().getHost().getSystemType(); + String type = getCommandSubSystem().getHost().getSystemType().getName(); return (type.equals("Windows") || //$NON-NLS-1$ type.equals("Local") && System.getProperty("os.name").toLowerCase().startsWith("win")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystem.java index 0b6d68e3b9c..2d51bb75c07 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystem.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ShellServiceSubSystem.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,7 +11,7 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem; @@ -61,11 +61,11 @@ public final class ShellServiceSubSystem extends RemoteCmdSubSystem implements I { if (_userHome == null) { - if (getSystemType() == IRSESystemType.SYSTEMTYPE_WINDOWS) + if (getSystemType().equals(IRSESystemType.SYSTEMTYPE_WINDOWS)) { _userHome = "c:\\"; //$NON-NLS-1$ } - else if (getSystemType() == IRSESystemType.SYSTEMTYPE_LOCAL) + else if (getSystemType().equals(IRSESystemType.SYSTEMTYPE_LOCAL)) { _userHome = System.getProperty("user.home"); //$NON-NLS-1$ } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemConnectAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemConnectAction.java index 7aa75f32971..2a6316e7e9d 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemConnectAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemConnectAction.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,7 +11,7 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.internal.ui.actions; @@ -65,7 +65,7 @@ public class SystemConnectAction extends SystemBaseAction { ISubSystem ss = (ISubSystem)getFirstSelection(); try { - if (ss.getHost().getSystemType().equals(IRSESystemType.SYSTEMTYPE_WINDOWS)) + if (ss.getHost().getSystemType().getName().equals(IRSESystemType.SYSTEMTYPE_WINDOWS)) ss.connect(); else ss.connect(true); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemWorkOfflineAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemWorkOfflineAction.java index 77bbe2d5991..95464192da0 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemWorkOfflineAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemWorkOfflineAction.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,7 +11,7 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.internal.ui.actions; @@ -102,7 +102,7 @@ public class SystemWorkOfflineAction extends SystemBaseAction } // check that everything was disconnedted okay and this is not the local connection - if(sr.isAnySubSystemConnected(conn) && !IRSESystemType.SYSTEMTYPE_LOCAL.equals(conn.getSystemType())) + if(sr.isAnySubSystemConnected(conn) && !IRSESystemType.SYSTEMTYPE_LOCAL.equals(conn.getSystemType().getName())) { // backout changes, likely because user cancelled the disconnect setChecked(false); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemUpdateConnectionDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemUpdateConnectionDialog.java index a2796970e2a..0bb56df8575 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemUpdateConnectionDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/dialogs/SystemUpdateConnectionDialog.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,7 +11,7 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.internal.ui.dialogs; @@ -122,7 +122,7 @@ public class SystemUpdateConnectionDialog extends SystemPromptDialog implements { IHost conn = (IHost)getInputObject(); ISystemRegistryUI sr = RSEUIPlugin.getDefault().getSystemRegistry(); - sr.updateHost( conn,conn.getSystemType(),form.getConnectionName(),form.getHostName(), + sr.updateHost( conn,conn.getSystemType().getName(),form.getConnectionName(),form.getHostName(), form.getConnectionDescription(), form.getDefaultUserId(), form.getUserIdLocation() ); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemConnectionPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemConnectionPropertyPage.java index 98f727b869d..7670cce857e 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemConnectionPropertyPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/propertypages/SystemConnectionPropertyPage.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,7 +11,7 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.internal.ui.propertypages; @@ -89,7 +89,7 @@ public class SystemConnectionPropertyPage extends SystemBasePropertyPage { IHost conn = (IHost)getElement(); ISystemRegistryUI sr = RSEUIPlugin.getDefault().getSystemRegistry(); - sr.updateHost( conn,conn.getSystemType(),form.getConnectionName(),form.getHostName(), + sr.updateHost( conn,conn.getSystemType().getName(),form.getConnectionName(),form.getHostName(), form.getConnectionDescription(), form.getDefaultUserId(), form.getUserIdLocation() ); @@ -129,7 +129,7 @@ public class SystemConnectionPropertyPage extends SystemBasePropertyPage } // check that everything was disconnedted okay and this is not the local connection - if(sr.isAnySubSystemConnected(conn) && !IRSESystemType.SYSTEMTYPE_LOCAL.equals(conn.getSystemType())) + if(sr.isAnySubSystemConnected(conn) && !IRSESystemType.SYSTEMTYPE_LOCAL.equals(conn.getSystemType().getName())) { // backout changes, likely because user cancelled the disconnect sr.setHostOffline(conn, false); 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 9bbf5937593..9706e23d291 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 @@ -15,6 +15,7 @@ * - created and used RSEPreferencesManager * Uwe Stieber (Wind River) - Menu action contributions can be acknowlegded by system type provider * David Dykstal (IBM) - 180562: remove implementation of IRSEUserIdConstants + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.internal.ui.view; @@ -110,7 +111,7 @@ public class SystemViewConnectionAdapter */ private IRSESystemType getSystemTypeForHost(IHost host) { if (host != null) { - return RSECorePlugin.getDefault().getRegistry().getSystemType((host.getSystemType())); + return host.getSystemType(); } return null; } @@ -531,7 +532,7 @@ public class SystemViewConnectionAdapter IHost conn = (IHost)propertySourceInput; if (name.equals(ISystemPropertyConstants.P_SYSTEMTYPE)) - return conn.getSystemType(); + return conn.getSystemType().getName(); else if (name.equals(ISystemPropertyConstants.P_HOSTNAME)) return conn.getHostName(); else if (name.equals(ISystemPropertyConstants.P_DEFAULTUSERID)) @@ -570,7 +571,7 @@ public class SystemViewConnectionAdapter { String localUserId = conn.getLocalDefaultUserId(); data.setLocalValue(localUserId); - String parentUserId = RSEPreferencesManager.getUserId(conn.getSystemType()); + String parentUserId = RSEPreferencesManager.getUserId(conn.getSystemType().getName()); data.setInheritedValue(parentUserId); data.setIsLocal((localUserId!=null)&&(localUserId.length()>0)); //data.printDetails(); @@ -627,18 +628,18 @@ public class SystemViewConnectionAdapter if (property.equals(ISystemPropertyConstants.P_DEFAULTUSERID)) { - //sr.updateConnection(null, conn, conn.getSystemType(), conn.getAliasName(), + //sr.updateConnection(null, conn, conn.getSystemType().getName(), conn.getAliasName(), // conn.getHostName(), conn.getDescription(), original_userId, USERID_LOCATION_CONNECTION); updateDefaultUserId(conn, original_userIdData); } else if (property.equals(ISystemPropertyConstants.P_HOSTNAME)) { - sr.updateHost(conn, conn.getSystemType(), conn.getAliasName(), original_hostName, + sr.updateHost(conn, conn.getSystemType().getName(), conn.getAliasName(), original_hostName, conn.getDescription(), conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET); } else if (property.equals(ISystemPropertyConstants.P_DESCRIPTION)) { - sr.updateHost(conn, conn.getSystemType(), conn.getAliasName(), conn.getHostName(), + sr.updateHost(conn, conn.getSystemType().getName(), conn.getAliasName(), conn.getHostName(), original_description, conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET); } } @@ -652,7 +653,7 @@ 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(conn, conn.getSystemType(), conn.getAliasName(), conn.getHostName(), + sr.updateHost(conn, conn.getSystemType().getName(), conn.getAliasName(), conn.getHostName(), conn.getDescription(), userId, whereToUpdate); } @@ -668,7 +669,7 @@ public class SystemViewConnectionAdapter if (name.equals(ISystemPropertyConstants.P_DEFAULTUSERID)) { //System.out.println("Testing setPropertyValue: " + value); - //sr.updateConnection(null, conn, conn.getSystemType(), conn.getAliasName(), + //sr.updateConnection(null, conn, conn.getSystemType().getName(), conn.getAliasName(), // conn.getHostName(), conn.getDescription(), (String)value, USERID_LOCATION_CONNECTION); updateDefaultUserId(conn, (SystemInheritablePropertyData)value); changed_userId = true; @@ -679,7 +680,7 @@ public class SystemViewConnectionAdapter // defect 57739 if (!((String)value).equalsIgnoreCase(conn.getHostName())) { - sr.updateHost(conn, conn.getSystemType(), conn.getAliasName(), (String)value, + sr.updateHost(conn, conn.getSystemType().getName(), conn.getAliasName(), (String)value, conn.getDescription(), conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET); changed_hostName = true; } @@ -690,7 +691,7 @@ public class SystemViewConnectionAdapter // defect 57739 if (!((String)value).equalsIgnoreCase(conn.getDescription())) { - sr.updateHost(conn, conn.getSystemType(), conn.getAliasName(), conn.getHostName(), + sr.updateHost(conn, conn.getSystemType().getName(), conn.getAliasName(), conn.getHostName(), (String)value, conn.getDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_NOTSET); changed_description = true; } @@ -707,7 +708,7 @@ public class SystemViewConnectionAdapter if (element instanceof IHost) { IHost sysCon = (IHost) element; - if (sysCon.getSystemType().equals(IRSESystemType.SYSTEMTYPE_LOCAL)) return existsMoreThanOneLocalConnection(); + if (sysCon.getSystemType().getName().equals(IRSESystemType.SYSTEMTYPE_LOCAL)) return existsMoreThanOneLocalConnection(); ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); return !sr.isAnySubSystemConnected((IHost)element); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDataDragAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDataDragAdapter.java index db9cc806a22..32dd9f4b81e 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDataDragAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewDataDragAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,7 +11,7 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.internal.ui.view; @@ -233,7 +233,7 @@ public class SystemViewDataDragAdapter extends DragSourceAdapter { IRemoteFile file = (IRemoteFile) dragObject; - String connectionType = file.getParentRemoteFileSubSystem().getHost().getSystemType(); + String connectionType = file.getParentRemoteFileSubSystem().getHost().getSystemType().getName(); if (connectionType.equals("Local")) { fileNames[i] = file.getAbsolutePath(); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSESystemTypeAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSESystemTypeAdapter.java index 053540ff35e..c33a71cd498 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSESystemTypeAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSESystemTypeAdapter.java @@ -14,6 +14,7 @@ * David Dykstal (IBM) - moved SystemPreferencesManager to a new package * - created and used RSEPreferencesManager * Uwe Stieber (Wind River) - Reworked new connection wizard extension point. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.ui; @@ -27,7 +28,6 @@ import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.rse.core.IRSESystemType; import org.eclipse.rse.core.IRSESystemTypeConstants; -import org.eclipse.rse.core.RSECorePlugin; import org.eclipse.rse.core.RSEPreferencesManager; import org.eclipse.rse.core.model.Host; import org.eclipse.rse.core.model.IHost; @@ -170,7 +170,7 @@ public class RSESystemTypeAdapter extends RSEAdapter { } public boolean isEnableOffline(Object object) { - if ((object != null) && (object instanceof IRSESystemType)) { + if (object instanceof IRSESystemType) { String property = ((IRSESystemType)object).getProperty(IRSESystemTypeConstants.ENABLE_OFFLINE); if (property != null) { return Boolean.valueOf(property).booleanValue(); @@ -298,7 +298,7 @@ public class RSESystemTypeAdapter extends RSEAdapter { assert host != null && actionClass != null; // The SystemWorkOfflineAction is accepted if isEnabledOffline is returning true if (actionClass.equals(SystemWorkOfflineAction.class)) { - return isEnableOffline(RSECorePlugin.getDefault().getRegistry().getSystemType(host.getSystemType())); + return isEnableOffline(host.getSystemType()); } // SystemClearAllPasswordsAction is accepted only if passwords are supported diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java index c3e88cbabed..d5b76a9ac0b 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java @@ -16,6 +16,7 @@ * Uwe Stieber (Wind River) - bugfixing and reworked new connection wizard * David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies * David Dykstal (IBM) - 180562: remove implementation of IRSEUserIdConstants + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.ui; @@ -270,7 +271,7 @@ public class SystemConnectionForm implements Listener, SelectionListener, Runnab */ public void initializeInputFields(IHost conn, boolean updateMode) { this.updateMode = updateMode; - defaultSystemType = conn.getSystemType(); + defaultSystemType = conn.getSystemType().getName(); defaultConnectionName = conn.getAliasName(); defaultHostName = conn.getHostName(); defaultUserId = conn.getLocalDefaultUserId(); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCopyToClipboardAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCopyToClipboardAction.java index 8aa78e3e976..7530ae1869c 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCopyToClipboardAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemCopyToClipboardAction.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,7 +11,7 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.ui.actions; @@ -225,7 +225,7 @@ public class SystemCopyToClipboardAction extends SystemBaseAction implements IV { IRemoteFile file = (IRemoteFile) dragObject; - String connectionType = file.getParentRemoteFileSubSystem().getHost().getSystemType(); + String connectionType = file.getParentRemoteFileSubSystem().getHost().getSystemType().getName(); if (connectionType.equals("Local")) { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java index 513d1537a8e..f7096a67c3d 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,11 +11,12 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.ui.propertypages; +import org.eclipse.rse.core.IRSESystemType; import org.eclipse.rse.core.subsystems.IConnectorService; import org.eclipse.rse.core.subsystems.IServiceSubSystem; import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration; @@ -31,7 +32,7 @@ public abstract class ServicesPropertyPage extends SystemBasePropertyPage { protected ServicesForm _form; protected String _hostname; - protected String _hosttype; + protected IRSESystemType _hosttype; protected ServiceElement _rootElement; protected Control createContentArea(Composite parent) @@ -113,7 +114,7 @@ public abstract class ServicesPropertyPage extends SystemBasePropertyPage _hostname = hostname; } - public void setSystemType(String systemType) + public void setSystemType(IRSESystemType systemType) { _hosttype = systemType; } @@ -123,7 +124,7 @@ public abstract class ServicesPropertyPage extends SystemBasePropertyPage return _hostname; } - public String getSystemType() + public IRSESystemType getSystemType() { return _hosttype; } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.java index 6477afded5d..097c42ca9f5 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/AbstractSystemViewAdapter.java @@ -12,6 +12,7 @@ * * Contributors: * Uwe Stieber (Wind River) - Allow to extend action filter by dynamic system type providers. + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType ********************************************************************************/ package org.eclipse.rse.ui.view; @@ -33,7 +34,6 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.rse.core.IRSESystemType; -import org.eclipse.rse.core.RSECorePlugin; import org.eclipse.rse.core.SystemAdapterHelpers; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.filters.ISystemFilterPoolReference; @@ -1438,7 +1438,7 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda { if (!(target instanceof IHost)) return false; - String connSysType = ((IHost)target).getSystemType(); + String connSysType = ((IHost)target).getSystemType().getName(); for (int idx=0; idx