jruaux      2003/01/17 09:26:53

  Modified:    Eclipse-Plugin/src/java/org/apache/cactus/eclipse/launcher
                        CactusLaunchShortcut.java
  Log:
  Formatting and null provider bug correction
  
  Revision  Changes    Path
  1.29      +22 -26    
jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/launcher/CactusLaunchShortcut.java
  
  Index: CactusLaunchShortcut.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/launcher/CactusLaunchShortcut.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- CactusLaunchShortcut.java 17 Jan 2003 15:22:38 -0000      1.28
  +++ CactusLaunchShortcut.java 17 Jan 2003 17:26:53 -0000      1.29
  @@ -90,7 +90,6 @@
   public class CactusLaunchShortcut
       extends JUnitLaunchShortcut
       implements ITestRunListener
  -
   {
   
       /**
  @@ -101,7 +100,7 @@
        * The provider to use for container setup.
        */
       private IContainerProvider provider;
  -    
  +
       /**
        * @return the Cactus launch configuration type. This method overrides
        *         the one in {@link JUnitLaunchShortcut} so that we can return
  @@ -245,24 +244,20 @@
           }
           catch (InvocationTargetException tearDownE)
           {
  -            CactusPlugin
  -                .displayErrorMessage(
  -                    CactusMessages.getString(
  -                        "CactusLaunch.message.teardown.error"),
  -                    tearDownE.getTargetException().getMessage(),
  +            CactusPlugin.displayErrorMessage(
  +                CactusMessages.getString("CactusLaunch.message.teardown.error"),
  +                tearDownE.getTargetException().getMessage(),
                   null);
           }
           catch (InterruptedException tearDownE)
           {
  -            CactusPlugin
  -                .displayErrorMessage(
  -                    CactusMessages.getString(
  -                        "CactusLaunch.message.teardown.error"),
  -                    tearDownE.getMessage(),
  +            CactusPlugin.displayErrorMessage(
  +                CactusMessages.getString("CactusLaunch.message.teardown.error"),
  +                tearDownE.getMessage(),
                   null);
           }
       }
  -    
  +
       /**
        * creates the war file, deploys and launches the container.
        * @param theJavaProject the Java file
  @@ -287,13 +282,10 @@
               if (contextURLPath.equals(""))
               {
                   CactusPlugin.throwCoreException(
  -                    "CactusLaunch.message.invalidproperty.contextpath", null);
  +                    "CactusLaunch.message.invalidproperty.contextpath",
  +                    null);
               }
  -            provider.deploy(
  -                contextURLPath,
  -                warURL,
  -                null,
  -                thePM);
  +            provider.deploy(contextURLPath, warURL, null, thePM);
               provider.start(null, thePM);
           }
           catch (MalformedURLException e)
  @@ -316,11 +308,16 @@
           throws CoreException
       {
           // The commented code is linked to the crashing VM problem
  -        //thePM.beginTask("Tearing down Cactus tests", 10);
  -        provider.stop(null, thePM);
  -        provider.undeploy(null, null, thePM);
  -        war.delete();
  -        //thePM.done();
  +//        thePM.beginTask(
  +//            CactusMessages.getString("CactusLaunch.message.teardown"),
  +//            10);
  +        if (provider != null)
  +        {
  +            provider.stop(null, thePM);
  +            provider.undeploy(null, null, thePM);
  +            war.delete();
  +        }
  +//        thePM.done();
       }
       /**
        * @see 
org.eclipse.jdt.internal.junit.runner.ITestRunListener#testRunStarted(int)
  @@ -329,7 +326,6 @@
       {
       }
   
  -    
       /**
        * Test run has ended so we tear down the container setup.
        * @param theElapsedTime not used here
  @@ -351,7 +347,7 @@
                   CactusMessages.getString("CactusLaunch.message.teardown.error"),
                   e.getMessage(),
                   null);
  -            }
  +        }
   //        ProgressMonitorDialog dialog =
   //            new ProgressMonitorDialog(getShell());
   //        try
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to