frysk.hpd
Class CLI

java.lang.Object
  extended by frysk.hpd.CLI

public class CLI
extends Object


Constructor Summary
CLI(String prompt, Writer outWriter)
          Constructor that creates a new steppingEngine
CLI(String prompt, Writer outWriter, SteppingEngine steppingEngine)
          Constructor
 
Method Summary
 int complete(String buffer, int cursor, List candidates)
          Handle ConsoleReader Completor
 void doAttach(Proc proc, boolean running)
           
 String execCommand(String cmd)
           
 void flushMessages()
          Makes sure that all messages for the user by commands through addMessage() are displayed.
 frysk.hpd.PTSet getCommandPTSet(frysk.hpd.Input cmd)
           
 PrintWriter getPrintWriter()
          Return output writer.
 String getPrompt()
           
static boolean notRunningProc(int pid, HashMap checkFiles)
          notRunningFile make sure we are not running the "go" command on procs that are loaded or on core files.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CLI

public CLI(String prompt,
           Writer outWriter,
           SteppingEngine steppingEngine)
Constructor

Parameters:
prompt - String initially to be used as the prompt
out - PrintWriter for output
steppingEngine - existing SteppingEngine

CLI

public CLI(String prompt,
           Writer outWriter)
Constructor that creates a new steppingEngine

Parameters:
prompt - String initially to be used as the prompt
out - PrintWriter for output.
Method Detail

complete

public int complete(String buffer,
                    int cursor,
                    List candidates)
Handle ConsoleReader Completor

Parameters:
buffer - Input buffer.
cursor - Position of TAB in buffer.
candidates - List that may complete token.
Returns:
cursor position in buffer

doAttach

public void doAttach(Proc proc,
                     boolean running)

getPrompt

public String getPrompt()

execCommand

public String execCommand(String cmd)

flushMessages

public void flushMessages()
Makes sure that all messages for the user by commands through addMessage() are displayed. Normally called after an update event or when a command has been executed before displaying a prompt.


getPrintWriter

public PrintWriter getPrintWriter()
Return output writer.


getCommandPTSet

public frysk.hpd.PTSet getCommandPTSet(frysk.hpd.Input cmd)

notRunningProc

public static boolean notRunningProc(int pid,
                                     HashMap checkFiles)
notRunningFile make sure we are not running the "go" command on procs that are loaded or on core files.

Parameters:
checkFiles - is a HashMap containing the procs we want to check
task - is what we need to check against
Returns:
true if it is a loaded or core file, false if not