mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-13 20:15:22 +02:00
[198790] make SSH createSession() protected
This commit is contained in:
parent
8e7b3a276d
commit
80c67c5af6
3 changed files with 22 additions and 3 deletions
|
@ -12,6 +12,7 @@
|
||||||
* - copied code from org.eclipse.team.cvs.ssh2/JSchSession (Copyright IBM)
|
* - copied code from org.eclipse.team.cvs.ssh2/JSchSession (Copyright IBM)
|
||||||
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
|
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
|
||||||
* Martin Oberhuber (Wind River) - [186761] make the port setting configurable
|
* Martin Oberhuber (Wind River) - [186761] make the port setting configurable
|
||||||
|
* Martin Oberhuber (Wind River) - [198790] make SSH createSession() protected
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.connectorservice.ssh;
|
package org.eclipse.rse.internal.connectorservice.ssh;
|
||||||
|
@ -70,7 +71,14 @@ public class SshConnectorService extends StandardConnectorService implements ISs
|
||||||
// <copied code from org.eclipse.team.cvs.ssh2/JSchSession (Copyright IBM)>
|
// <copied code from org.eclipse.team.cvs.ssh2/JSchSession (Copyright IBM)>
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
private static Session createSession(String username, String password, String hostname, int port, UserInfo wrapperUI, IProgressMonitor monitor) throws JSchException {
|
/**
|
||||||
|
* Create a Jsch session.
|
||||||
|
* Subclasses can override in order to replace the UserInfo wrapper
|
||||||
|
* (for non-interactive usage, for instance), or in order to change
|
||||||
|
* the Jsch config (for instance, in order to switch off strict
|
||||||
|
* host key checking or in order to add specific ciphers).
|
||||||
|
*/
|
||||||
|
protected Session createSession(String username, String password, String hostname, int port, UserInfo wrapperUI, IProgressMonitor monitor) throws JSchException {
|
||||||
IJSchService service = Activator.getDefault().getJSchService();
|
IJSchService service = Activator.getDefault().getJSchService();
|
||||||
if (service == null)
|
if (service == null)
|
||||||
return null;
|
return null;
|
||||||
|
@ -102,6 +110,9 @@ public class SshConnectorService extends StandardConnectorService implements ISs
|
||||||
|
|
||||||
protected void internalConnect(IProgressMonitor monitor) throws Exception
|
protected void internalConnect(IProgressMonitor monitor) throws Exception
|
||||||
{
|
{
|
||||||
|
// Fire comm event to signal state about to change
|
||||||
|
fireCommunicationsEvent(CommunicationsEvent.BEFORE_CONNECT);
|
||||||
|
|
||||||
String host = getHostName();
|
String host = getHostName();
|
||||||
String user = getUserId();
|
String user = getUserId();
|
||||||
String password=""; //$NON-NLS-1$
|
String password=""; //$NON-NLS-1$
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-SymbolicName: org.eclipse.tm.terminal.ssh;singleton:=true
|
Bundle-SymbolicName: org.eclipse.tm.terminal.ssh;singleton:=true
|
||||||
Bundle-Version: 1.0.0.qualifier
|
Bundle-Version: 1.0.1.qualifier
|
||||||
Bundle-Vendor: %providerName
|
Bundle-Vendor: %providerName
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
Require-Bundle: org.eclipse.ui,
|
Require-Bundle: org.eclipse.ui,
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified
|
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified
|
||||||
* Martin Oberhuber (Wind River) - [175686] Adapted to new IJSchService API
|
* Martin Oberhuber (Wind River) - [175686] Adapted to new IJSchService API
|
||||||
* - copied code from org.eclipse.team.cvs.ssh2/JSchSession (Copyright IBM)
|
* - copied code from org.eclipse.team.cvs.ssh2/JSchSession (Copyright IBM)
|
||||||
|
* Martin Oberhuber (Wind River) - [198790] make SSH createSession() protected
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.tm.internal.terminal.ssh;
|
package org.eclipse.tm.internal.terminal.ssh;
|
||||||
|
|
||||||
|
@ -50,7 +51,14 @@ class SshConnection extends Thread {
|
||||||
// <copied code from org.eclipse.team.cvs.ssh2/JSchSession (Copyright IBM)>
|
// <copied code from org.eclipse.team.cvs.ssh2/JSchSession (Copyright IBM)>
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
private static Session createSession(String username, String password, String hostname, int port, UserInfo wrapperUI, IProgressMonitor monitor) throws JSchException {
|
/**
|
||||||
|
* Create a Jsch session.
|
||||||
|
* Subclasses can override in order to replace the UserInfo wrapper
|
||||||
|
* (for non-interactive usage, for instance), or in order to change
|
||||||
|
* the Jsch config (for instance, in order to switch off strict
|
||||||
|
* host key checking or in order to add specific ciphers).
|
||||||
|
*/
|
||||||
|
protected Session createSession(String username, String password, String hostname, int port, UserInfo wrapperUI, IProgressMonitor monitor) throws JSchException {
|
||||||
IJSchService service = Activator.getDefault().getJSchService();
|
IJSchService service = Activator.getDefault().getJSchService();
|
||||||
if (service == null)
|
if (service == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Add table
Reference in a new issue