UTJML

edu.utep.cs.utjml.canica.tool
Class JDKTool.CommandThread

java.lang.Object
  extended by java.lang.Thread
      extended by edu.utep.cs.utjml.canica.tool.JDKTool.CommandThread
All Implemented Interfaces:
Runnable
Enclosing class:
JDKTool

protected class JDKTool.CommandThread
extends Thread

A thread class to execute a given shell command in a given directory. The output and error messages are all directed to the message pane of the given tool.

Author:
Yoonsik Cheon and Angelica B Perez

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
JDKTool.CommandThread(String cmd, File dir, OutputPaneable outputPane, FileBrowserable fileBrowser, Mainable canica)
          Creates a new instance.
 
Method Summary
 void run()
          Executes the command cmd in the directory dir by wiring all output and error messages to the message pane of the tool utjml.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JDKTool.CommandThread

public JDKTool.CommandThread(String cmd,
                             File dir,
                             OutputPaneable outputPane,
                             FileBrowserable fileBrowser,
                             Mainable canica)
Creates a new instance.

Parameters:
cmd - The shell command to execute.
dir - The directory in which to execute the given command.
utjml - The tool of whose output pane all outputs and error messages are to be directed to.
Method Detail

run

public void run()
Executes the command cmd in the directory dir by wiring all output and error messages to the message pane of the tool utjml.

Specified by:
run in interface Runnable
Overrides:
run in class Thread

UTJML

UTJML is Copyright (C) 2004-2006 by University of Texas at El Paso and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the JML project.