cmlenz 2003/06/29 11:18:11
Modified:
integration/eclipse/org.apache.cactus.eclipse.runner/src/java/org/apache/cactus/eclipse/runner/containers/ant
AntContainerManager.java AntContainerProvider.java
EclipseRunTests.java
Log:
Removed unused variables and a bit of formatting cleanup
Revision Changes Path
1.13 +17 -26
jakarta-cactus/integration/eclipse/org.apache.cactus.eclipse.runner/src/java/org/apache/cactus/eclipse/runner/containers/ant/AntContainerManager.java
Index: AntContainerManager.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/integration/eclipse/org.apache.cactus.eclipse.runner/src/java/org/apache/cactus/eclipse/runner/containers/ant/AntContainerManager.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- AntContainerManager.java 11 Jun 2003 17:04:17 -0000 1.12
+++ AntContainerManager.java 29 Jun 2003 18:18:11 -0000 1.13
@@ -139,6 +139,7 @@
* Context path for the container provider
*/
private String contextURLPath;
+
/**
* Reference to the War file so that we can delete it on tearDown()
*/
@@ -146,6 +147,7 @@
/**
* Constructor.
+ *
* @param theBuildFilePath path to the Ant build file for this manager
* @param thePort the port that will be used when setting up the containers
* @param theTargetDir temporary directory to use for
@@ -154,12 +156,8 @@
* @param theContextURLPath context path of the container provider
* @throws CoreException if an argument is invalid
*/
- public AntContainerManager(
- String theBuildFilePath,
- int thePort,
- String theTargetDir,
- Hashtable theHomes,
- String theContextURLPath)
+ public AntContainerManager(String theBuildFilePath, int thePort,
+ String theTargetDir, Hashtable theHomes, String theContextURLPath)
throws CoreException
{
this.buildFilePath = theBuildFilePath;
@@ -168,6 +166,7 @@
/**
* Initializer.
+ *
* @param thePort the port that will be used when setting up the containers
* @param theTargetDir temporary directory to use for
* containers configuration
@@ -175,12 +174,8 @@
* @param theContextURLPath context path of the container provider
* @throws CoreException if an argument is invalid
*/
- public void init(
- int thePort,
- String theTargetDir,
- Hashtable theHomes,
- String theContextURLPath)
- throws CoreException
+ public void init(int thePort, String theTargetDir, Hashtable theHomes,
+ String theContextURLPath) throws CoreException
{
if (thePort <= 0)
{
@@ -246,9 +241,7 @@
* @throws CoreException if the launch configuration cannot be created
*/
public ILaunchConfigurationWorkingCopy createAntLaunchConfiguration(
- String[] theProviderArguments,
- String theTarget)
- throws CoreException
+ String[] theProviderArguments, String theTarget) throws CoreException
{
CactusPlugin thePlugin = CactusPlugin.getDefault();
URL buildFileURL = thePlugin.find(new Path(buildFilePath));
@@ -371,16 +364,15 @@
}
/**
- * creates the war file, deploys and launches the container.
+ * Creates the war file, deploys and launches the container.
+ *
* @param theJavaProject the Java file
* @param thePM the progress monitor to report to
* @param theProvider the provider to prepare
* @throws CoreException if anything goes wrong during preparation
*/
- private void prepareCactusTests(
- IJavaProject theJavaProject,
- IProgressMonitor thePM,
- IContainerProvider theProvider)
+ private void prepareCactusTests(IJavaProject theJavaProject,
+ IProgressMonitor thePM, IContainerProvider theProvider)
throws CoreException
{
this.currentPM = thePM;
@@ -423,6 +415,7 @@
/**
* Launches a new progress dialog for preparation cancellation.
+ *
* @param theProvider the provider which preparation to cancel
*/
private void cancelPreparation(final IContainerProvider theProvider)
@@ -489,10 +482,8 @@
* @param theProvider the provider of the container to stop and undeploy
* @throws CoreException if an error occurs when tearing down
*/
- private void teardownCactusTests(
- IProgressMonitor thePM,
- IContainerProvider theProvider)
- throws CoreException
+ private void teardownCactusTests(IProgressMonitor thePM,
+ IContainerProvider theProvider) throws CoreException
{
thePM.beginTask(
CactusMessages.getString("CactusLaunch.message.teardown"),
@@ -527,7 +518,7 @@
}
/**
- *
+ * Sets the prepared flag.
*/
public void preparationDone()
{
1.5 +17 -27
jakarta-cactus/integration/eclipse/org.apache.cactus.eclipse.runner/src/java/org/apache/cactus/eclipse/runner/containers/ant/AntContainerProvider.java
Index: AntContainerProvider.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/integration/eclipse/org.apache.cactus.eclipse.runner/src/java/org/apache/cactus/eclipse/runner/containers/ant/AntContainerProvider.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- AntContainerProvider.java 26 May 2003 11:59:44 -0000 1.4
+++ AntContainerProvider.java 29 Jun 2003 18:18:11 -0000 1.5
@@ -66,7 +66,6 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
@@ -85,26 +84,27 @@
* the manager of this provider
*/
private AntContainerManager manager;
+
/**
* the Ant arguments specific to this provider
*/
private Vector antArguments = new Vector();
- /**
- * A boolean indicating if the container is running.
- */
- private boolean serverStopped;
+
/**
* The Eclipse runner associated to the Ant container provider.
*/
private EclipseRunTests eclipseRunner;
+
/**
* The home directory of this provider.
*/
private String home;
+
/**
* The Ant target mask for this provider, for example "tomcat4x".
*/
private String targetMask;
+
/**
* Reference to the launch created to start the container.
*/
@@ -115,10 +115,8 @@
* @param theTargetMask target mask for this provider
* @param theHome home directory for this provider's container
*/
- public AntContainerProvider(
- AntContainerManager theManager,
- String theTargetMask,
- String theHome)
+ public AntContainerProvider(AntContainerManager theManager,
+ String theTargetMask, String theHome)
{
this.targetMask = theTargetMask;
this.home = theHome;
@@ -128,11 +126,8 @@
/**
* @see IContainerProvider#deploy(String, URL, Credential)
*/
- public void deploy(
- String theContextPath,
- URL theDeployableObject,
- Credential theCredentials,
- IProgressMonitor thePM)
+ public void deploy(String theContextPath, URL theDeployableObject,
+ Credential theCredentials, IProgressMonitor thePM)
throws CoreException
{
thePM.subTask(CactusMessages.getString("CactusLaunch.message.deploy"));
@@ -147,9 +142,6 @@
public void start(ContainerInfo theContainerInfo, IProgressMonitor thePM)
throws CoreException
{
- ILaunchManager launchManager =
- DebugPlugin.getDefault().getLaunchManager();
-
thePM.subTask(CactusMessages.getString("CactusLaunch.message.start"));
String target = getTarget("cactus.run.");
antArguments.add(
@@ -194,11 +186,8 @@
/**
* @see IContainerProvider#undeploy (String, Credential)
*/
- public void undeploy(
- String theContextPath,
- Credential theCredentials,
- IProgressMonitor thePM)
- throws CoreException
+ public void undeploy(String theContextPath, Credential theCredentials,
+ IProgressMonitor thePM) throws CoreException
{
thePM.subTask(
CactusMessages.getString("CactusLaunch.message.undeploy"));
@@ -213,8 +202,8 @@
}
/**
- * @param theEclipseRunner the EclipseRunTests instance to associate with
- * this container provider, which will be notified of test run end.
+ * @param theEclipseRunner The EclipseRunTests instance to associate with
+ * this container provider, which will be notified of test run end
*/
public void setEclipseRunner(EclipseRunTests theEclipseRunner)
{
@@ -223,8 +212,9 @@
/**
* Returns the concatenated String of the prefix and the provider target.
- * @param thePrefix prefix to append to the provider target
- * @return String the concatenated string
+ *
+ * @param thePrefix The prefix to append to the provider target
+ * @return The concatenated string
*/
private String getTarget(String thePrefix)
{
1.6 +4 -5
jakarta-cactus/integration/eclipse/org.apache.cactus.eclipse.runner/src/java/org/apache/cactus/eclipse/runner/containers/ant/EclipseRunTests.java
Index: EclipseRunTests.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/integration/eclipse/org.apache.cactus.eclipse.runner/src/java/org/apache/cactus/eclipse/runner/containers/ant/EclipseRunTests.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- EclipseRunTests.java 15 Apr 2003 14:42:17 -0000 1.5
+++ EclipseRunTests.java 29 Jun 2003 18:18:11 -0000 1.6
@@ -70,13 +70,13 @@
*
* @version $Id$
*/
-
public class EclipseRunTests extends Task implements Runnable
{
/**
* Indicates that tests are finished, meaning that the task can terminate.
*/
- private boolean isFinished = false;
+ private volatile boolean isFinished = false;
+
/**
* Launches the Junit tests in Eclipse
*/
@@ -122,8 +122,7 @@
CactusPlugin.displayErrorMessage(
CactusMessages.getString(
"CactusLaunch.message.containerManager.error"),
- e.getMessage(),
- null);
+ e.getMessage(), null);
return;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]