UTJML

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

java.lang.Object
  extended by edu.utep.cs.utjml.canica.tool.ToolController
All Implemented Interfaces:
Toolable

public class ToolController
extends Object
implements Toolable

Implementation class of the Toolable class. This ToolController class implements the services of the Toolable class. It is the controller of the Tool Subsystem.

Author:
Angelica Berenice Perez Apr 25, 2006

Constructor Summary
ToolController(Mainable canica, OutputPaneable output)
          Constructor
 
Method Summary
 void checkJML()
          This service calls the JML checker tool from the UTJML tools system to check JML syntax to a single Java file.
 void checkJMLCurrAndSubdirs()
          This service calls the JML checker tool from the UTJML tools system to check JML syntax to all files under specific directory and all subdirectories.
 void checkJMLCurrentDir()
          This service calls the JML checker tool from the UTJML tools system to check JML syntax to all files in the current directory.
 void checkJMLGroupOfFiles()
          This service calls the JML checker tool from the UTJML tools system to check JML syntax to a group of files.
 boolean compilable(String msg)
          Is the current file compilable with JML?
 void compileJava()
          Calls the Java compiler tool from the Java SDK 1.4.2 to compile the active editing Java file.
 void compileJavaSync(File aef)
           
 void compileJML()
          This service calls the JML compiler tool from the UTJML tools system to compile the active editing file.
 void compileJMLTest()
          This service calls the tool from the UTJML tools system to compile the active editing file for test.
 void compileTestDataForTest()
          This service calls the Java compiler tool from the Java SDK 1.4.2 system to compile the test data generated of the active editing file.
 void getAutomTestingToolAction()
          This service does automatically testing to the active editing file.
 boolean isSuperClassEqualTo(Class classFile, String superClassName2)
          It compares classFile super class to superClassName2.
 void javaDoc()
          This service calls the Javadoc tool from the Java SDK 1.4.2 system to generate Java documentation to a single file, a group of files, or all files under specific directory and subdirectories.
 void JMLDoc()
          It generates JML documentation to the active editing file or files given using the JMLDoc tool from the UTJML tools.
 void loadAndTest()
          This service lets the user load a test file in the JML editor to compile it with the Java compiler and then test it.
 Class loadFile(File file)
          Loads the given class file for testing.
 void run()
          This service calls the Java Virtual Machine tool from the Java SDK 1.4.2 to run the Java bytecode file of the active editing file.
 void runTest()
          It runs the test data file class (*_JML_TestData.class) corresponding to the active editing file.
 void runTestGeneration()
          This service calls the tool from the UTJML tools system to generate test data for a Java file.
 void selectRunTestClass()
          It runs a test class file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToolController

public ToolController(Mainable canica,
                      OutputPaneable output)
Constructor

Parameters:
canica - This IDE
output - The output of this IDE
Method Detail

compileJava

public void compileJava()
Description copied from interface: Toolable
Calls the Java compiler tool from the Java SDK 1.4.2 to compile the active editing Java file.

Specified by:
compileJava in interface Toolable

compileJavaSync

public void compileJavaSync(File aef)

runTest

public void runTest()
Description copied from interface: Toolable
It runs the test data file class (*_JML_TestData.class) corresponding to the active editing file. It displays the output to the Run Test view (Output subsystem).

Specified by:
runTest in interface Toolable

selectRunTestClass

public void selectRunTestClass()
Description copied from interface: Toolable
It runs a test class file. It provides a Dialog to choose a specific test class file. It doesn't need to be opened in the JML editor.

Specified by:
selectRunTestClass in interface Toolable

javaDoc

public void javaDoc()
Description copied from interface: Toolable
This service calls the Javadoc tool from the Java SDK 1.4.2 system to generate Java documentation to a single file, a group of files, or all files under specific directory and subdirectories.

Specified by:
javaDoc in interface Toolable

JMLDoc

public void JMLDoc()
Description copied from interface: Toolable
It generates JML documentation to the active editing file or files given using the JMLDoc tool from the UTJML tools.

Specified by:
JMLDoc in interface Toolable

checkJML

public void checkJML()
Description copied from interface: Toolable
This service calls the JML checker tool from the UTJML tools system to check JML syntax to a single Java file.

Specified by:
checkJML in interface Toolable

checkJMLCurrentDir

public void checkJMLCurrentDir()
Description copied from interface: Toolable
This service calls the JML checker tool from the UTJML tools system to check JML syntax to all files in the current directory.

Specified by:
checkJMLCurrentDir in interface Toolable

checkJMLGroupOfFiles

public void checkJMLGroupOfFiles()
Description copied from interface: Toolable
This service calls the JML checker tool from the UTJML tools system to check JML syntax to a group of files.

Specified by:
checkJMLGroupOfFiles in interface Toolable

checkJMLCurrAndSubdirs

public void checkJMLCurrAndSubdirs()
Description copied from interface: Toolable
This service calls the JML checker tool from the UTJML tools system to check JML syntax to all files under specific directory and all subdirectories.

Specified by:
checkJMLCurrAndSubdirs in interface Toolable

compileJML

public void compileJML()
Description copied from interface: Toolable
This service calls the JML compiler tool from the UTJML tools system to compile the active editing file.

Specified by:
compileJML in interface Toolable

run

public void run()
Description copied from interface: Toolable
This service calls the Java Virtual Machine tool from the Java SDK 1.4.2 to run the Java bytecode file of the active editing file.

Specified by:
run in interface Toolable

compileJMLTest

public void compileJMLTest()
Description copied from interface: Toolable
This service calls the tool from the UTJML tools system to compile the active editing file for test.

Specified by:
compileJMLTest in interface Toolable

runTestGeneration

public void runTestGeneration()
Description copied from interface: Toolable
This service calls the tool from the UTJML tools system to generate test data for a Java file. This is the second step for testing.

Specified by:
runTestGeneration in interface Toolable

compileTestDataForTest

public void compileTestDataForTest()
Description copied from interface: Toolable
This service calls the Java compiler tool from the Java SDK 1.4.2 system to compile the test data generated of the active editing file. This is the third step for testing.

Specified by:
compileTestDataForTest in interface Toolable

loadAndTest

public void loadAndTest()
Description copied from interface: Toolable
This service lets the user load a test file in the JML editor to compile it with the Java compiler and then test it.

Specified by:
loadAndTest in interface Toolable

getAutomTestingToolAction

public void getAutomTestingToolAction()
Description copied from interface: Toolable
This service does automatically testing to the active editing file. It executes the four steps: compile JML for test, generate test data, compile test data generated for test, and run the tests.

Specified by:
getAutomTestingToolAction in interface Toolable

isSuperClassEqualTo

public boolean isSuperClassEqualTo(Class classFile,
                                   String superClassName2)
It compares classFile super class to superClassName2. It returns true if they are the same.

Parameters:
classFile - Class file given.
superClassName2 - Class file name given.
Returns:
True or false.

loadFile

public Class loadFile(File file)
Loads the given class file for testing. All the public methods and constructors will be read and displayed with their specifications


compilable

public boolean compilable(String msg)
Is the current file compilable with JML?


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.