UTJML

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

java.lang.Object
  extended by edu.utep.cs.utjml.canica.tool.JDKTool

public class JDKTool
extends Object

This class is responsible to provide services to execute the tools of the Java SDK 1.4.2 System.

Author:
Angelica Berenice Perez May 7th 2006

Nested Class Summary
protected  class JDKTool.CommandThread
          A thread class to execute a given shell command in a given directory.
 
Constructor Summary
JDKTool(Mainable canica, OutputPaneable output, FileBrowserable fileBrowser)
          Constructor
 
Method Summary
 void compileJava(String command, String filename, File parentFile)
          It executes the javac command to compile the file name and show its output to main program.
 Thread compileJavaSync(String command, String filename, File parentFile)
           
 Thread doRunCommand(String cmd, String target, File parentFile)
          Run a specific command in the operating system.
 void run(String command, String filename, File parentFile)
          Runs the file associated with the editing buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDKTool

public JDKTool(Mainable canica,
               OutputPaneable output,
               FileBrowserable fileBrowser)
Constructor

Method Detail

compileJava

public void compileJava(String command,
                        String filename,
                        File parentFile)
It executes the javac command to compile the file name and show its output to main program.

Parameters:
command - Command name
filename - File name to compile
parentFile -
mainable - Canica main program

compileJavaSync

public Thread compileJavaSync(String command,
                              String filename,
                              File parentFile)

run

public void run(String command,
                String filename,
                File parentFile)
Runs the file associated with the editing buffer. If there are unsaved changes, such changes must be saved prior to calling this method. The execution output and error messages, if any, are wired to the message pane.


doRunCommand

public Thread doRunCommand(String cmd,
                           String target,
                           File parentFile)
Run a specific command in the operating system. this Thread has already started.

Parameters:
cmd - Command
target - execution target
parentFile - Directory
Returns:
this 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.