org.apache.cactus.eclipse.runner.launcher
Class CactusLaunchConfiguration

java.lang.Object
  extended by org.eclipse.debug.core.model.LaunchConfigurationDelegate
      extended by org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate
          extended by org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate
              extended by org.apache.cactus.eclipse.runner.launcher.CactusLaunchConfiguration
All Implemented Interfaces:
org.eclipse.debug.core.IDebugEventSetListener, org.eclipse.debug.core.model.ILaunchConfigurationDelegate, org.eclipse.debug.core.model.ILaunchConfigurationDelegate2, org.eclipse.jdt.junit.ITestRunListener
Direct Known Subclasses:
JettyCactusLaunchConfiguration

public class CactusLaunchConfiguration
extends org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate
implements org.eclipse.jdt.junit.ITestRunListener

Provides a launcher to start Cactus tests. This is done by extending the JUnit Plugin launch configuration and adding Cactus specific VM configuration (Cactus jars, VM parameters) and by registering this class as an "org.eclipse.debug.core.launchConfigurationTypes" Eclipse extension point.

Version:
$Id: CactusLaunchConfiguration.java 238816 2004-02-29 16:36:46Z vmassol $

Field Summary
static java.lang.String ID_CACTUS_APPLICATION
          Id under which the Cactus launch configuration has been registered.
protected static java.lang.String VM_ARG_SEPARATOR
          Separator between VM arguments
 
Fields inherited from class org.eclipse.debug.core.model.LaunchConfigurationDelegate
complileErrorProjectPromptStatus, complileErrorPromptStatus, promptStatus, saveScopedDirtyEditors, switchToDebugPromptStatus
 
Fields inherited from interface org.eclipse.jdt.junit.ITestRunListener
STATUS_ERROR, STATUS_FAILURE, STATUS_OK
 
Constructor Summary
CactusLaunchConfiguration()
           
 
Method Summary
protected  org.eclipse.jdt.core.IClasspathEntry[] getCactusClasspath()
           
protected  java.lang.String getCactusVMArgs(org.eclipse.jdt.core.IJavaProject theJavaProject)
           
 void launch(org.eclipse.debug.core.ILaunchConfiguration theConfiguration, java.lang.String theMode, org.eclipse.debug.core.ILaunch theLaunch, org.eclipse.core.runtime.IProgressMonitor thePM)
           
 void testEnded(java.lang.String theTestId, java.lang.String theTestName)
           
 void testFailed(int theStatus, java.lang.String theTestId, java.lang.String theTestName, java.lang.String theTrace)
           
 void testReran(java.lang.String theTestId, java.lang.String theTestClass, java.lang.String theTestName, int theStatus, java.lang.String theTrace)
           
 void testRunEnded(long theElapsedTime)
          Test run has ended so we tear down the container setup.
 void testRunStarted(int theTestCount)
           
 void testRunStopped(long theElapsedTime)
          If test run has stopped we have to do the same thing as if the test run had ended normally.
 void testRunTerminated()
          If test run has been terminated we have to do the same thing as if the test run had ended normally.
 void testStarted(java.lang.String theTestId, java.lang.String theTestName)
           
 void testTreeEntry(java.lang.String theEntry)
           
 
Methods inherited from class org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate
abort, collectExecutionArguments, evaluateTests, getClasspath, preLaunchCheck, verifyMainTypeName
 
Methods inherited from class org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate
getBootpath, getBootpathExt, getBreakpoints, getBuildOrder, getDefaultWorkingDirectory, getEnvironment, getJavaLibraryPath, getJavaProject, getJavaProjectName, getLaunchManager, getMainTypeName, getProgramArguments, getProjectsForProblemSearch, getVMArguments, getVMConnectorId, getVMInstall, getVMInstallName, getVMInstallType, getVMInstallTypeId, getVMRunner, getVMSpecificAttributesMap, getWorkingDirectory, getWorkingDirectoryPath, handleDebugEvents, isAllowTerminate, isLaunchProblem, isStopInMain, preLaunchCheck, prepareStopInMain, setDefaultSourceLocator, verifyJavaProject, verifyVMInstall, verifyWorkingDirectory
 
Methods inherited from class org.eclipse.debug.core.model.LaunchConfigurationDelegate
addReferencedProjects, buildForLaunch, buildProjects, computeBuildOrder, computeReferencedBuildOrder, existsProblems, finalLaunchCheck, getLaunch, saveBeforeLaunch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID_CACTUS_APPLICATION

public static final java.lang.String ID_CACTUS_APPLICATION
Id under which the Cactus launch configuration has been registered.

See Also:
Constant Field Values

VM_ARG_SEPARATOR

protected static final java.lang.String VM_ARG_SEPARATOR
Separator between VM arguments

See Also:
Constant Field Values
Constructor Detail

CactusLaunchConfiguration

public CactusLaunchConfiguration()
Method Detail

launch

public void launch(org.eclipse.debug.core.ILaunchConfiguration theConfiguration,
                   java.lang.String theMode,
                   org.eclipse.debug.core.ILaunch theLaunch,
                   org.eclipse.core.runtime.IProgressMonitor thePM)
            throws org.eclipse.core.runtime.CoreException
Specified by:
launch in interface org.eclipse.debug.core.model.ILaunchConfigurationDelegate
Overrides:
launch in class org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate
Throws:
org.eclipse.core.runtime.CoreException
See Also:
ILaunchConfigurationDelegate#launch(ILaunchConfiguration, String)

getCactusClasspath

protected org.eclipse.jdt.core.IClasspathEntry[] getCactusClasspath()
                                                             throws org.eclipse.core.runtime.CoreException
Returns:
an array of classpaths needed for Cactus
Throws:
org.eclipse.core.runtime.CoreException - when an error occurs while trying to build the classpath

getCactusVMArgs

protected java.lang.String getCactusVMArgs(org.eclipse.jdt.core.IJavaProject theJavaProject)
Parameters:
theJavaProject - the Java project to get the arguments for
Returns:
an array of the specific Cactus VM arguments

testRunStarted

public void testRunStarted(int theTestCount)
Specified by:
testRunStarted in interface org.eclipse.jdt.junit.ITestRunListener
See Also:
ITestRunListener.testRunStarted(int)

testRunEnded

public void testRunEnded(long theElapsedTime)
Test run has ended so we tear down the container setup.

Specified by:
testRunEnded in interface org.eclipse.jdt.junit.ITestRunListener
Parameters:
theElapsedTime - not used here

testRunStopped

public void testRunStopped(long theElapsedTime)
If test run has stopped we have to do the same thing as if the test run had ended normally.

Specified by:
testRunStopped in interface org.eclipse.jdt.junit.ITestRunListener
Parameters:
theElapsedTime - not used here

testStarted

public void testStarted(java.lang.String theTestId,
                        java.lang.String theTestName)
Specified by:
testStarted in interface org.eclipse.jdt.junit.ITestRunListener
See Also:
ITestRunListener.testStarted(String, String)

testEnded

public void testEnded(java.lang.String theTestId,
                      java.lang.String theTestName)
Specified by:
testEnded in interface org.eclipse.jdt.junit.ITestRunListener
See Also:
ITestRunListener.testEnded(String, String)

testFailed

public void testFailed(int theStatus,
                       java.lang.String theTestId,
                       java.lang.String theTestName,
                       java.lang.String theTrace)
Specified by:
testFailed in interface org.eclipse.jdt.junit.ITestRunListener
See Also:
(int, String, String, String)

testTreeEntry

public void testTreeEntry(java.lang.String theEntry)
See Also:
ITestRunListener#testTreeEntry(String)

testRunTerminated

public void testRunTerminated()
If test run has been terminated we have to do the same thing as if the test run had ended normally.

Specified by:
testRunTerminated in interface org.eclipse.jdt.junit.ITestRunListener

testReran

public void testReran(java.lang.String theTestId,
                      java.lang.String theTestClass,
                      java.lang.String theTestName,
                      int theStatus,
                      java.lang.String theTrace)
Specified by:
testReran in interface org.eclipse.jdt.junit.ITestRunListener
See Also:
ITestRunListener.testReran(String, String, String, int, String)


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.