jruaux 2003/02/25 09:50:04
Modified: integration/eclipse/src/java/org/apache/cactus/eclipse/launcher
CactusLaunchShortcut.java
Log:
Corrected problem with consecutive launches
Revision Changes Path
1.6 +22 -10
jakarta-cactus/integration/eclipse/src/java/org/apache/cactus/eclipse/launcher/CactusLaunchShortcut.java
Index: CactusLaunchShortcut.java
===================================================================
RCS file:
/home/cvs/jakarta-cactus/integration/eclipse/src/java/org/apache/cactus/eclipse/launcher/CactusLaunchShortcut.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- CactusLaunchShortcut.java 24 Feb 2003 13:56:05 -0000 1.5
+++ CactusLaunchShortcut.java 25 Feb 2003 17:50:04 -0000 1.6
@@ -92,7 +92,10 @@
extends JUnitLaunchShortcut
implements ITestRunListener
{
-
+ /**
+ * Indicates whether we already went through the launch cycle.
+ */
+ private boolean launchEnded;
/**
* Reference to the War file so that we can delete it on tearDown()
*/
@@ -166,18 +169,20 @@
CactusMessages.getString("CactusLaunch.message.notests"),
null);
}
- else if (types.length > 1)
- {
- type = chooseType(types, theMode);
- }
else
- {
- type = types[0];
- }
+ if (types.length > 1)
+ {
+ type = chooseType(types, theMode);
+ }
+ else
+ {
+ type = types[0];
+ }
if (type != null)
{
+ launchEnded = false;
// Register the instance of CactusLaunchShortcut to the JUnitPlugin
- // for TestRun end notification.
+ // for TestRunEnd notification.
JUnitPlugin.getDefault().addTestRunListener(this);
this.search = theSearch;
this.mode = theMode;
@@ -363,6 +368,12 @@
*/
public void testRunEnded(long theElapsedTime)
{
+ // If we already finished the launch (i.e. we already went here)
+ // we do nothing.
+ if (launchEnded)
+ {
+ return;
+ }
CactusPlugin.log("Test run ended");
final IRunnableWithProgress runnable = new IRunnableWithProgress()
{
@@ -412,6 +423,7 @@
}
});
+ launchEnded = true;
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]