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

[174299] serivce subsystems need to be identified by the service type, not the service name. In order to retrieve the correct subsystem model object via hashmap, the absolute name of the subsystem must be the same regardless of service implemnetation.

This commit is contained in:
David McKnight 2007-03-26 17:32:53 +00:00
parent 986ebc1673
commit f9da65fbf0

View file

@ -25,6 +25,7 @@ import org.eclipse.rse.core.IRSEUserIdConstants;
import org.eclipse.rse.core.SystemBasePlugin;
import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.core.subsystems.IConnectorService;
import org.eclipse.rse.core.subsystems.IServiceSubSystem;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
@ -148,7 +149,17 @@ public class SystemViewSubSystemAdapter extends AbstractSystemViewAdapter
public String getAbsoluteName(Object element)
{
ISubSystem ss = (ISubSystem)element;
return ss.getSystemProfileName() + "." + ss.getHostAliasName() + "." + ss.getName(); //$NON-NLS-1$ //$NON-NLS-2$
// DKM - using type instead of name
if (ss instanceof IServiceSubSystem)
{
return ss.getSystemProfileName() + "." + ss.getHostAliasName() + "." + ((IServiceSubSystem)ss).getServiceType(); //$NON-NLS-1$ //$NON-NLS-2$
}
else
{
return ss.getSystemProfileName() + "." + ss.getHostAliasName() + "." + ss.getName(); //$NON-NLS-1$ //$NON-NLS-2$
}
}
/**
* Return the type label for this object