mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 23:25:26 +02:00
[175262][api] IHost.getSystemType() should return IRSESystemType
This commit is contained in:
parent
92320907ab
commit
f501ac6de3
45 changed files with 336 additions and 350 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 <code>null</code>.
|
||||
*/
|
||||
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
|
||||
}
|
||||
|
||||
}
|
|
@ -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 <code>IHost</code> object.
|
||||
*/
|
||||
private String systemType = null;
|
||||
private IRSESystemType systemType = null;
|
||||
|
||||
/**
|
||||
* The alias name of this <code>IHost</code> 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.<br>
|
||||
* 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.
|
||||
* <p>
|
||||
* 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.
|
||||
* <p>
|
||||
* 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).
|
||||
* <p>
|
||||
* 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.
|
||||
* <p>
|
||||
* This is all transparent to the caller though.
|
||||
* <p>
|
||||
* @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.
|
||||
* <p>
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* Query if this connection is offline or not. It is up to each subsystem to honor this
|
||||
* flag.
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.model.IHost#isOffline()
|
||||
*/
|
||||
public boolean isOffline() {
|
||||
return offline;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* Specify if this connection is offline or not. It is up to each subsystem to honor this
|
||||
* flag.
|
||||
* <!-- end-user-doc -->
|
||||
* @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;
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
* <p>
|
||||
*/
|
||||
/**
|
||||
* @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.
|
||||
* <p>
|
||||
* 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.
|
||||
* <p>
|
||||
* 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 <code>true</code> 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.
|
||||
* <p>
|
||||
* 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 '<em><b>Offline</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* 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.
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Offline</em>' attribute.
|
||||
* @see #setOffline(boolean)
|
||||
*/
|
||||
boolean isOffline();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.rse.core.model.IHost#isOffline <em>Offline</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* 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 '<em>Offline</em>' attribute.
|
||||
* @see #isOffline()
|
||||
* @generated
|
||||
*/
|
||||
void setOffline(boolean value);
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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$
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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$
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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$
|
||||
|
|
|
@ -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$
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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() );
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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"))
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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<values.length; idx++)
|
||||
{
|
||||
if (connSysType.equals(values[idx]))
|
||||
|
@ -1448,7 +1448,7 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
|
|||
}
|
||||
for (int idx=0; idx<values.length; idx++)
|
||||
{
|
||||
if (ss.getHost().getSystemType().equals(values[idx]))
|
||||
if (ss.getHost().getSystemType().getName().equals(values[idx]))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -1509,7 +1509,7 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
|
|||
}
|
||||
|
||||
if (conn != null) {
|
||||
IRSESystemType systemType = RSECorePlugin.getDefault().getRegistry().getSystemType(conn.getSystemType());
|
||||
IRSESystemType systemType = conn.getSystemType();
|
||||
if (systemType != null) {
|
||||
IActionFilter actionFilter = (IActionFilter)ACTION_FILTER_CACHE.get(systemType);
|
||||
if (actionFilter == null) {
|
||||
|
|
|
@ -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.widgets;
|
||||
|
@ -31,6 +31,7 @@ import org.eclipse.jface.viewers.TableViewer;
|
|||
import org.eclipse.jface.viewers.TextCellEditor;
|
||||
import org.eclipse.jface.viewers.Viewer;
|
||||
import org.eclipse.jface.window.Window;
|
||||
import org.eclipse.rse.core.IRSESystemType;
|
||||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
||||
import org.eclipse.rse.internal.ui.SystemResources;
|
||||
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
|
||||
|
@ -74,7 +75,7 @@ public class EnvironmentVariablesForm extends SystemBaseForm implements Selectio
|
|||
private EnvironmentVariablesTableContentProvider provider;
|
||||
private Object selectedObject;
|
||||
private TableViewer envVarTableViewer;
|
||||
private String systemType;
|
||||
private IRSESystemType systemType;
|
||||
private String invalidNameChars;
|
||||
|
||||
private Button addButton, changeButton, removeButton, moveUpButton, moveDownButton;
|
||||
|
@ -365,7 +366,7 @@ public class EnvironmentVariablesForm extends SystemBaseForm implements Selectio
|
|||
new EnvironmentVariablesPromptDialog(
|
||||
getShell(),
|
||||
SystemResources.RESID_SUBSYSTEM_ENVVAR_ADD_TITLE,
|
||||
systemType,
|
||||
systemType.getName(),
|
||||
invalidNameChars,
|
||||
getVariableNames(),
|
||||
false);
|
||||
|
@ -517,7 +518,7 @@ public class EnvironmentVariablesForm extends SystemBaseForm implements Selectio
|
|||
EnvironmentVariablesPromptDialog(
|
||||
getShell(),
|
||||
SystemResources.RESID_SUBSYSTEM_ENVVAR_CHANGE_TITLE,
|
||||
systemType,
|
||||
systemType.getName(),
|
||||
invalidNameChars,
|
||||
getVariableNames(),
|
||||
true);
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* 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.wizards;
|
||||
|
@ -96,7 +97,7 @@ public class SubSystemServiceWizardPage extends AbstractSystemNewConnectionWizar
|
|||
RSEDefaultNewConnectionWizard wizard = (RSEDefaultNewConnectionWizard)getWizard();
|
||||
if (wizard.getStartingPage() instanceof RSEDefaultNewConnectionWizardMainPage) {
|
||||
dummyHost = new DummyHost(((RSEDefaultNewConnectionWizardMainPage)wizard.getStartingPage()).getSystemConnectionForm().getHostName(),
|
||||
wizard.getSystemType() != null ? wizard.getSystemType().getName() : null);
|
||||
wizard.getSystemType());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - Bug 158555 - newConnectionWizardDelegates can only be used once
|
||||
* 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.wizards.newconnection;
|
||||
|
@ -245,8 +246,7 @@ public class RSEMainNewConnectionWizard extends Wizard implements INewWizard, IS
|
|||
// If there is an connection context, extract the connections
|
||||
// system type from the connection context as use as default
|
||||
if (connectionContext != null && connectionContext.getSystemType() != null) {
|
||||
String systemTypeName = connectionContext.getSystemType();
|
||||
IRSESystemType systemType = RSECorePlugin.getDefault().getRegistry().getSystemType(systemTypeName);
|
||||
IRSESystemType systemType = connectionContext.getSystemType();
|
||||
// if we have found the system type object, pass on to setSelection(...)!
|
||||
if (systemType != null) setSelection(new StructuredSelection(systemType));
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
@ -13,6 +13,7 @@
|
|||
* Contributors:
|
||||
* David Dykstal (IBM) - created and used RSEPReferencesManager
|
||||
* - moved SystemsPreferencesManager to a new plugin
|
||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.model;
|
||||
|
@ -137,7 +138,7 @@ public class SystemHostPool extends RSEModelObject implements ISystemHostPool
|
|||
System.out.println(" AliasName.....: " + conn.getAliasName()); //$NON-NLS-1$
|
||||
System.out.println(" -----------------------------------------------------"); //$NON-NLS-1$
|
||||
System.out.println(" HostName......: " + conn.getHostName()); //$NON-NLS-1$
|
||||
System.out.println(" SystemType....: " + conn.getSystemType()); //$NON-NLS-1$
|
||||
System.out.println(" SystemType....: " + conn.getSystemType().getId()); //$NON-NLS-1$
|
||||
System.out.println(" Description...: " + conn.getDescription()); //$NON-NLS-1$
|
||||
System.out.println(" UserId........: " + conn.getDefaultUserId()); //$NON-NLS-1$
|
||||
}
|
||||
|
@ -224,7 +225,7 @@ public class SystemHostPool extends RSEModelObject implements ISystemHostPool
|
|||
addHost(conn); // only record internally if saved successfully
|
||||
conn.setHostPool(this);
|
||||
conn.setAliasName(aliasName);
|
||||
conn.setSystemType(systemType);
|
||||
conn.setSystemType(systemTypeObject);
|
||||
// if default userID is null, and location is in the connection we should retrieve it and use it as the initial value.
|
||||
if (defaultUserId == null && defaultUserIdLocation == IRSEUserIdConstants.USERID_LOCATION_HOST) {
|
||||
defaultUserId = conn.getDefaultUserId();
|
||||
|
@ -263,7 +264,8 @@ public class SystemHostPool extends RSEModelObject implements ISystemHostPool
|
|||
boolean aliasNameChanged = !aliasName.equalsIgnoreCase(conn.getAliasName());
|
||||
if (aliasNameChanged)
|
||||
renameHost(conn,aliasName);
|
||||
conn.setSystemType(systemType);
|
||||
IRSESystemType systemTypeObject = RSECorePlugin.getDefault().getRegistry().getSystemType(systemType);
|
||||
conn.setSystemType(systemTypeObject);
|
||||
conn.setHostName(hostName);
|
||||
if (defaultUserIdLocation != IRSEUserIdConstants.USERID_LOCATION_NOTSET)
|
||||
{
|
||||
|
@ -437,7 +439,7 @@ public class SystemHostPool extends RSEModelObject implements ISystemHostPool
|
|||
throws Exception
|
||||
{
|
||||
IHost copy =
|
||||
targetPool.createHost(conn.getSystemType(), aliasName,
|
||||
targetPool.createHost(conn.getSystemType().getName(), aliasName,
|
||||
conn.getHostName(), conn.getDescription(), conn.getLocalDefaultUserId(), IRSEUserIdConstants.USERID_LOCATION_HOST);
|
||||
return copy;
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
* David Dykstal (IBM) - moved SystemsPreferencesManager to a new package
|
||||
* Uwe Stieber (Wind River) - bugfixing
|
||||
* David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
|
||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.model;
|
||||
|
@ -255,7 +256,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven
|
|||
List result = new ArrayList();
|
||||
for (int i = 0; i < connections.length; i++) {
|
||||
IHost con = connections[i];
|
||||
IRSESystemType sysType = RSECorePlugin.getDefault().getRegistry().getSystemType(con.getSystemType());
|
||||
IRSESystemType sysType = con.getSystemType();
|
||||
if (sysType != null) { // sysType can be null if workspace contains a host that is no longer defined by the workbench
|
||||
RSESystemTypeAdapter adapter = (RSESystemTypeAdapter)(sysType.getAdapter(IRSESystemType.class));
|
||||
// Note: System types without registered subsystems get disabled by the adapter itself!
|
||||
|
@ -295,7 +296,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven
|
|||
{
|
||||
for (int idx = 0; (!hasSubsystems) && (idx < subsystemFactoryProxies.length); idx++)
|
||||
{
|
||||
if (subsystemFactoryProxies[idx].appliesToSystemType(selectedConnection.getSystemType()) &&
|
||||
if (subsystemFactoryProxies[idx].appliesToSystemType(selectedConnection.getSystemType().getName()) &&
|
||||
subsystemFactoryProxies[idx].isSubSystemConfigurationActive())
|
||||
{
|
||||
SubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration();
|
||||
|
@ -1239,7 +1240,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven
|
|||
{
|
||||
for (int idx = 0; idx < subsystemFactoryProxies.length; idx++)
|
||||
{
|
||||
// if (subsystemFactoryProxies[idx].appliesToSystemType(conn.getSystemType()))
|
||||
// if (subsystemFactoryProxies[idx].appliesToSystemType(conn.getSystemType().getName()))
|
||||
// {
|
||||
ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration();
|
||||
if (factory != null)
|
||||
|
@ -1395,7 +1396,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven
|
|||
{
|
||||
for (int idx = 0; idx < subsystemFactoryProxies.length; idx++)
|
||||
{
|
||||
if (subsystemFactoryProxies[idx].appliesToSystemType(conn.getSystemType()) && subsystemFactoryProxies[idx].isSubSystemConfigurationActive())
|
||||
if (subsystemFactoryProxies[idx].appliesToSystemType(conn.getSystemType().getName()) && subsystemFactoryProxies[idx].isSubSystemConfigurationActive())
|
||||
{
|
||||
ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration();
|
||||
if (factory != null)
|
||||
|
@ -1772,9 +1773,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven
|
|||
IHost[] candidates = getHosts();
|
||||
for (int i = 0; i < candidates.length; i++) {
|
||||
IHost candidate = candidates[i];
|
||||
//FIXME: If IHost.getSystemType() returns the id or the IRSESystemType
|
||||
// object, this comparisation must be adapted.
|
||||
IRSESystemType candidateType = RSECorePlugin.getDefault().getRegistry().getSystemType(candidate.getSystemType());
|
||||
IRSESystemType candidateType = candidate.getSystemType();
|
||||
if (systemType.equals(candidateType)) {
|
||||
connections.add(candidate);
|
||||
}
|
||||
|
@ -1812,7 +1811,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven
|
|||
Vector v = new Vector();
|
||||
for (int idx = 0; idx < connections.length; idx++)
|
||||
{
|
||||
String systemType = connections[idx].getSystemType();
|
||||
String systemType = connections[idx].getSystemType().getName();
|
||||
boolean match = false;
|
||||
for (int jdx = 0; !match && (jdx < systemTypes.length); jdx++)
|
||||
if (systemType.equals(systemTypes[jdx]))
|
||||
|
@ -1948,7 +1947,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven
|
|||
{
|
||||
if (!v.contains(conns[idx].getHostName()))
|
||||
{
|
||||
if (conns[idx].getSystemType().equals(systemType))
|
||||
if (conns[idx].getSystemType().getName().equals(systemType))
|
||||
v.addElement(conns[idx].getHostName());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2002, 2006 IBM Corporation and Wind River Systems, Inc. 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
|
||||
|
@ -14,6 +14,7 @@
|
|||
* Martin Oberhuber (Wind River) - 141803: Fix cpu usage 100% while connecting
|
||||
* David Dykstal (IBM) - 168870: moved SystemPreferencesManager to a new package
|
||||
* David Dykstal (IBM) - 168870: created and used RSEPreferencesManager
|
||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.core.subsystems;
|
||||
|
@ -896,14 +897,16 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
|||
|
||||
/**
|
||||
* Return the system type for this connection.
|
||||
* FIXME Return an IRSESystemType instead
|
||||
* @deprecated
|
||||
*/
|
||||
public String getSystemType()
|
||||
{
|
||||
IHost conn = getHost();
|
||||
if (conn == null)
|
||||
if (conn == null || conn.getSystemType()==null)
|
||||
return null;
|
||||
else
|
||||
return conn.getSystemType();
|
||||
return conn.getSystemType().getName();
|
||||
}
|
||||
/**
|
||||
* Return the host name for the connection this system's subsystem is associated with
|
||||
|
|
|
@ -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
|
||||
|
@ -14,6 +14,7 @@
|
|||
* David Dykstal (IBM) - 168870: moved SystemPreferencesManager to a new package
|
||||
* David Dykstal (IBM) - 168977: refactoring IConnectorService and ServerLauncher hierarchies
|
||||
* David Dykstal (IBM) - 168870: made use of adapters on the SubSystemConfigurationProxy
|
||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.core.subsystems;
|
||||
|
@ -986,7 +987,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration
|
|||
if (allActiveConnections != null)
|
||||
{
|
||||
for (int idx = 0; idx < allActiveConnections.length; idx++)
|
||||
if (proxy.appliesToSystemType(allActiveConnections[idx].getSystemType()))
|
||||
if (proxy.appliesToSystemType(allActiveConnections[idx].getSystemType().getName()))
|
||||
getSubSystems(allActiveConnections[idx], force); // will load from disk if not already loaded
|
||||
}
|
||||
allSubSystemsRestored = true;
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2007 IBM Corporation. All rights reserved.
|
||||
* 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) - 168977: refactoring IConnectorService
|
||||
* Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType
|
||||
********************************************************************************/
|
||||
package org.eclipse.rse.ui.subsystems;
|
||||
|
||||
|
@ -174,7 +175,7 @@ public class StandardCredentialsProvider extends AbstractCredentialsProvider {
|
|||
ISubSystem subsystem = getPrimarySubSystem();
|
||||
IHost host = subsystem.getHost();
|
||||
String hostName = host.getHostName();
|
||||
String hostType = host.getSystemType();
|
||||
String hostType = host.getSystemType().getName();
|
||||
savePassword = false;
|
||||
if (supportsUserId()) {
|
||||
boolean sameHost = hostName.equalsIgnoreCase(getConnectorService().getHostName());
|
||||
|
@ -252,7 +253,7 @@ public class StandardCredentialsProvider extends AbstractCredentialsProvider {
|
|||
public final ICredentials getCredentials() {
|
||||
IHost host = getConnectorService().getHost();
|
||||
String hostName = host.getHostName();
|
||||
String systemType = host.getSystemType();
|
||||
String systemType = host.getSystemType().getName();
|
||||
SystemSignonInformation result = new SystemSignonInformation(hostName, userId, password, systemType);
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2001, 2006 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2001, 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.core;
|
||||
|
@ -425,7 +425,7 @@ public class SystemRemoteObjectMatcher
|
|||
systemTypesMatch = false;
|
||||
else
|
||||
{
|
||||
String connSysType = ((IHost)element).getSystemType();
|
||||
String connSysType = ((IHost)element).getSystemType().getName();
|
||||
systemTypesMatch = false;
|
||||
for (int idx=0; !systemTypesMatch && (idx<values.length); idx++)
|
||||
{
|
||||
|
@ -439,7 +439,7 @@ public class SystemRemoteObjectMatcher
|
|||
systemTypesMatch = false;
|
||||
for (int idx=0; !systemTypesMatch && (idx<values.length); idx++)
|
||||
{
|
||||
if (subsystem.getHost().getSystemType().equals(values[idx]))
|
||||
if (subsystem.getHost().getSystemType().getName().equals(values[idx]))
|
||||
systemTypesMatch = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2006, 2007 Wind River Systems, Inc. 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
|
||||
|
@ -63,7 +63,7 @@ public class FileServiceTest extends RSEBaseConnectionTestCase {
|
|||
}
|
||||
|
||||
public boolean isWindows() {
|
||||
String systemTypeId = fss.getHost().getSystemType();
|
||||
String systemTypeId = fss.getHost().getSystemType().getName();
|
||||
if (systemTypeId.equals("Local")) { //$NON-NLS-1$
|
||||
return System.getProperty("os.name").toLowerCase().startsWith("win"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue