mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Apply patch for bug 150929: handle supportsUserId() properly
This commit is contained in:
parent
090f1b7bae
commit
f355260209
3 changed files with 21 additions and 7 deletions
|
@ -58,9 +58,7 @@ public class DaytimeSubsystemConfiguration extends ServiceSubSystemConfiguration
|
|||
return false;
|
||||
}
|
||||
public boolean supportsUserId() {
|
||||
// TODO for now, we have to connect in order to pass the hostname to the service
|
||||
// This should not be necessary in an ideal world
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public boolean isFactoryFor(Class subSystemType) {
|
||||
return DaytimeSubSystem.class.equals(subSystemType);
|
||||
|
|
|
@ -100,6 +100,13 @@ public class DeveloperSubSystemConfiguration extends SubSystemConfiguration {
|
|||
return RSESamplesPlugin.getResourceString("property.type.devrfilter"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsUserId()
|
||||
*/
|
||||
public boolean supportsUserId() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchProperties(org.eclipse.rse.model.IHost)
|
||||
*/
|
||||
|
|
|
@ -238,7 +238,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
|||
public void setSubSystemConfiguration(ISubSystemConfiguration ssf)
|
||||
{
|
||||
parentSubSystemFactory = ssf;
|
||||
supportsConnecting = ssf.supportsUserId();
|
||||
supportsConnecting = ssf.supportsSubSystemConnect();
|
||||
//System.out.println("subsystem supports connecting? " + supportsConnecting);
|
||||
}
|
||||
/**
|
||||
|
@ -1663,7 +1663,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
|||
protected boolean implicitConnect(boolean isConnectOperation, IProgressMonitor mon, String msg, int totalWorkUnits) throws SystemMessageException, InvocationTargetException, InterruptedException
|
||||
{
|
||||
boolean didConnection = false;
|
||||
if (doConnection && !isConnected())// caller wants to do connection first as part operation
|
||||
if ( doConnection && !isConnected())// caller wants to do connection first as part operation
|
||||
{
|
||||
if (isOffline() || (supportsCaching() && getCacheManager().isRestoreFromMemento()))
|
||||
{
|
||||
|
@ -2543,7 +2543,9 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
|||
if (runnableContext instanceof ProgressMonitorDialog) {
|
||||
((ProgressMonitorDialog) runnableContext).setCancelable(true);
|
||||
}
|
||||
getConnectorService().promptForPassword(shell, forcePrompt); // prompt for userid and password
|
||||
if (getSubSystemConfiguration().supportsUserId()) {
|
||||
getConnectorService().promptForPassword(shell, forcePrompt); // prompt for userid and password
|
||||
}
|
||||
ConnectJob job = new ConnectJob();
|
||||
scheduleJob(job, null, shell != null);
|
||||
IStatus status = job.getResult();
|
||||
|
@ -2567,7 +2569,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
|||
boolean ok = false;
|
||||
if (!supportsConnecting)
|
||||
return true;
|
||||
|
||||
|
||||
if (isOffline())
|
||||
{
|
||||
// offline so don't bother prompting
|
||||
|
@ -2579,6 +2581,13 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
|||
doConnection = true; // this gets handled later when it comes time to connect
|
||||
return true;
|
||||
}
|
||||
else if (!getSubSystemConfiguration().supportsUserId())
|
||||
{
|
||||
// subsystem needs no user id so dont bother prompting
|
||||
doConnection = true; // this gets handled later when it comes time to connect
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue