1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 18:56:02 +02:00

[404967] - Change JSch provider name. Remove local provider from list of

providers.

Signed-off-by: Greg Watson <g.watson@computer.org>
This commit is contained in:
Greg Watson 2013-09-18 17:25:19 -04:00
parent db67b20142
commit 11d7cb75eb
4 changed files with 11 additions and 11 deletions

View file

@ -22,6 +22,8 @@ import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint; import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IExtensionRegistry; import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.eclipse.internal.remote.core.services.local.LocalServices;
import org.eclipse.remote.core.RemoteServices;
/** /**
* Main entry point for remote services * Main entry point for remote services
@ -56,7 +58,8 @@ public class RemoteServicesImpl {
} }
/** /**
* Retrieve a sorted list of remote service descriptors. * Retrieve a sorted list of remote service descriptors. Does not return the local service provider. This must be obtained
* using the {@link RemoteServices#getLocalServices()} method.
* *
* @return remote service descriptors * @return remote service descriptors
*/ */
@ -64,7 +67,9 @@ public class RemoteServicesImpl {
retrieveRemoteServices(); retrieveRemoteServices();
List<RemoteServicesDescriptor> descriptors = new ArrayList<RemoteServicesDescriptor>(); List<RemoteServicesDescriptor> descriptors = new ArrayList<RemoteServicesDescriptor>();
for (RemoteServicesDescriptor descriptor : fRemoteServicesById.values()) { for (RemoteServicesDescriptor descriptor : fRemoteServicesById.values()) {
descriptors.add(descriptor); if (!descriptor.getId().equals(LocalServices.LocalServicesId)) {
descriptors.add(descriptor);
}
} }
Collections.sort(descriptors); Collections.sort(descriptors);
return descriptors; return descriptors;

View file

@ -22,6 +22,7 @@ public interface IRemoteServices extends IRemoteServicesDescriptor {
public static final int CAPABILITY_REMOVE_CONNECTIONS = 0x04; public static final int CAPABILITY_REMOVE_CONNECTIONS = 0x04;
public static final int CAPABILITY_SUPPORTS_TCP_PORT_FORWARDING = 0x08; public static final int CAPABILITY_SUPPORTS_TCP_PORT_FORWARDING = 0x08;
public static final int CAPABILITY_SUPPORTS_X11_FORWARDING = 0x10; public static final int CAPABILITY_SUPPORTS_X11_FORWARDING = 0x10;
public static final int CAPABILITY_SUPPORTS_COMMAND_SHELL = 0x20;
/** /**
* Get a connection manager for managing remote connections. * Get a connection manager for managing remote connections.

View file

@ -13,8 +13,8 @@ package org.eclipse.remote.core;
import java.net.URI; import java.net.URI;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.internal.remote.core.RemoteServicesImpl;
import org.eclipse.internal.remote.core.RemoteServicesDescriptor; import org.eclipse.internal.remote.core.RemoteServicesDescriptor;
import org.eclipse.internal.remote.core.RemoteServicesImpl;
import org.eclipse.internal.remote.core.services.local.LocalServices; import org.eclipse.internal.remote.core.services.local.LocalServices;
/** /**
@ -23,19 +23,13 @@ import org.eclipse.internal.remote.core.services.local.LocalServices;
* @since 7.0 * @since 7.0
*/ */
public class RemoteServices { public class RemoteServices {
// Local services
private static IRemoteServices fLocalServices;
/** /**
* Retrieve the local services provider. Guaranteed to exist and be initialized. * Retrieve the local services provider. Guaranteed to exist and be initialized.
* *
* @return local services provider * @return local services provider
*/ */
public static IRemoteServices getLocalServices() { public static IRemoteServices getLocalServices() {
if (fLocalServices == null) { return getRemoteServices(LocalServices.LocalServicesId);
fLocalServices = getRemoteServices(LocalServices.LocalServicesId);
}
return fLocalServices;
} }
/** /**

View file

@ -6,7 +6,7 @@
<remoteServices <remoteServices
class="org.eclipse.internal.remote.jsch.core.JSchServicesFactory" class="org.eclipse.internal.remote.jsch.core.JSchServicesFactory"
id="org.eclipse.remote.JSch" id="org.eclipse.remote.JSch"
name="JSch" name="Built-in SSH"
scheme="ssh"> scheme="ssh">
</remoteServices> </remoteServices>
</extension> </extension>