diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/internal/subsystems/shells/ssh/SshServiceCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/internal/subsystems/shells/ssh/SshServiceCommandShell.java index 5840cc452d7..f0edfbfcef2 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/internal/subsystems/shells/ssh/SshServiceCommandShell.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/internal/subsystems/shells/ssh/SshServiceCommandShell.java @@ -14,6 +14,7 @@ * Contributors: * Martin Oberhuber (Wind River) - Adapted from LocalServiceCommandShell * Martin Oberhuber (Wind River) - [225510][api] Fix OutputRefreshJob API leakage + * Anna Dushistova (MontaVista) - [259414][api] refactor the "SSH Shell" to use the generic Terminal->IHostShell converter *******************************************************************************/ package org.eclipse.rse.internal.subsystems.shells.ssh; @@ -26,6 +27,7 @@ import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Path; import org.eclipse.rse.core.subsystems.ISubSystem; +import org.eclipse.rse.internal.services.shells.TerminalServiceHostShell; import org.eclipse.rse.internal.services.ssh.shell.SshHostShell; import org.eclipse.rse.services.shells.IHostOutput; import org.eclipse.rse.services.shells.IHostShell; @@ -181,6 +183,9 @@ public class SshServiceCommandShell extends ServiceCommandShell */ protected String getPromptCommand() { IHostShell shell = getHostShell(); + if (shell instanceof TerminalServiceHostShell) { + return ((TerminalServiceHostShell)shell).getPromptCommand(); + } //Assert shell instanceof SshHostShell; if (shell instanceof SshHostShell) { return ((SshHostShell)shell).getPromptCommand(); diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshShellSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshShellSubSystemConfiguration.java index 7aaf4494432..e966cb732b8 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshShellSubSystemConfiguration.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshShellSubSystemConfiguration.java @@ -13,6 +13,7 @@ * * Contributors: * Martin Oberhuber (Wind River) - Adapted template for ssh service. + * Anna Dushistova (MontaVista) - [259414][api] refactor the "SSH Shell" to use the generic Terminal->IHostShell converter *******************************************************************************/ package org.eclipse.rse.subsystems.shells.ssh; @@ -23,7 +24,7 @@ import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.internal.connectorservice.ssh.SshConnectorService; import org.eclipse.rse.internal.connectorservice.ssh.SshConnectorServiceManager; import org.eclipse.rse.internal.services.ssh.ISshService; -import org.eclipse.rse.internal.services.ssh.shell.SshShellService; +import org.eclipse.rse.internal.services.ssh.terminal.SshTerminalService; import org.eclipse.rse.internal.subsystems.shells.ssh.SshServiceCommandShell; import org.eclipse.rse.services.shells.IHostShell; import org.eclipse.rse.services.shells.IShellService; @@ -61,7 +62,7 @@ public class SshShellSubSystemConfiguration extends public IShellService createShellService(IHost host) { SshConnectorService cserv = (SshConnectorService)getConnectorService(host); - return new SshShellService(cserv); + return (IShellService) (new SshTerminalService(cserv)).getAdapter(IShellService.class); } public IConnectorService getConnectorService(IHost host) {