Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.shells.ui
Class RemoteCommandHelpers

java.lang.Object
  extended by 
org.eclipse.rse.shells.ui.RemoteCommandHelpers

public class RemoteCommandHelpers
extends Object

Static helpers to simplify the act of running a universal command against a local or remote Unix, Windows or Linux command shell.


Constructor Summary
RemoteCommandHelpers ()
          Constructor for RemoteCommandHelpers.
 
Method Summary
static  IRemoteCmdSubSystem getCmdSubSystem ( IHost connection)
           
static  IRemoteCmdSubSystem[] getCmdSubSystems ( IHost connection)
           
static  String getWorkingDirectory ( IRemoteFile selectedFile)
          Helper method to return the path to change-directory to, given a selected remote file object
static boolean runUniversalCommand ( Shell shell, String cmdString, String path, IRemoteCmdSubSystem cmdSubSystem)
           
static boolean runUniversalCommand ( Shell shell, String cmdString, String path, IRemoteCmdSubSystem cmdSubSystem, boolean isCompile)
          Encapsulation of code needed to run a universal subsystem command.
static void showInView ( IRemoteCommandShell cmd, boolean isCompile, String cmdString)
           
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteCommandHelpers

public RemoteCommandHelpers()
Constructor for RemoteCommandHelpers.

Method Detail

getWorkingDirectory

public static 
String getWorkingDirectory(
IRemoteFile selectedFile)
Helper method to return the path to change-directory to, given a selected remote file object


getCmdSubSystem

public static 
IRemoteCmdSubSystem getCmdSubSystem(
IHost connection)

getCmdSubSystems

public static 
IRemoteCmdSubSystem[] getCmdSubSystems(
IHost connection)

runUniversalCommand

public static boolean runUniversalCommand(
Shell shell,
                                          
String cmdString,
                                          
String path,
                                          
IRemoteCmdSubSystem cmdSubSystem)

runUniversalCommand

public static boolean runUniversalCommand(
Shell shell,
                                          
String cmdString,
                                          
String path,
                                          
IRemoteCmdSubSystem cmdSubSystem,
                                          boolean isCompile)
Encapsulation of code needed to run a universal subsystem command. A universal command is a command that runs in a Unix or Linux or Windows command shell, as opposed to something unique like an OS/400 or z/OS command. This:
  • Sets the current directory to the given path
  • Runs the given command remotely
  • Logs the command and its output in the command view

Parameters:
shell - - the shell to use if need to prompt for password or show msg dialog
cmdString - - the resolved command
path - - the path to run the command against
cmdSubSystem - - this connection's command subsystem, which will run the command
Returns:
true if we should continue, false if something went wrong

showInView

public static void showInView(
IRemoteCommandShell cmd,
                              boolean isCompile,
                              
String cmdString)

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire