jruaux      2002/10/24 05:36:55

  Modified:    Eclipse-Plugin/src/java/org/apache/cactus/eclipse/launcher
                        CactusLaunchShortcut.java
  Log:
  Added the prototype Ant integration to the launch
  
  Revision  Changes    Path
  1.6       +43 -0     
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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CactusLaunchShortcut.java 22 Oct 2002 13:32:59 -0000      1.5
  +++ CactusLaunchShortcut.java 24 Oct 2002 12:36:55 -0000      1.6
  @@ -58,6 +58,7 @@
   
   import java.lang.reflect.InvocationTargetException;
   
  +import org.apache.cactus.eclipse.containers.Tomcat40AntContainerProvider;
   import org.eclipse.core.runtime.CoreException;
   import org.eclipse.debug.core.DebugPlugin;
   import org.eclipse.debug.core.ILaunchConfiguration;
  @@ -95,6 +96,9 @@
               CactusLaunchConfiguration.ID_CACTUS_APPLICATION);
       }
   
  +    /**
  +     * @see JUnitLaunchShortcut#launchType(Object[], String)
  +     */
       protected void launchType(Object[] search, String mode)
       {
           IType[] types = null;
  @@ -134,16 +138,55 @@
           }
       }
   
  +    /**
  +     * @see JUnitLaunchShortcut#launch(IType, String)
  +     */
       private void launch(IType type, String mode)
       {
           ILaunchConfiguration config = findLaunchConfiguration(type, mode);
           System.out.println("Setting up the container");
  +        Tomcat40AntContainerProvider matou = new Tomcat40AntContainerProvider();
  +        try
  +        {
  +            matou.deploy();
  +        }
  +        catch (CoreException e)
  +        {
  +            e.printStackTrace();
  +        }
           System.out.println("Starting the container");
  +        try
  +        {
  +            matou.start();
  +        }
  +        catch (CoreException e)
  +        {
  +            e.printStackTrace();
  +        }
           launchConfiguration(mode, config);
           System.out.println("Stoping the container");
  +        try
  +        {
  +            matou.stop();
  +        }
  +        catch (CoreException e)
  +        {
  +            e.printStackTrace();
  +        }
           System.out.println("Cleaning the container");
  +        try
  +        {
  +            matou.undeploy();
  +        }
  +        catch (CoreException e)
  +        {
  +            e.printStackTrace();
  +        }
       }
   
  +    /**
  +     * @see JUnitLaunchShortcut#launchConfiguration(String, ILaunchConfiguration)
  +     */
       private void launchConfiguration(String mode, ILaunchConfiguration config)
       {
           try
  
  
  

--
To unsubscribe, e-mail:   <mailto:cactus-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-dev-help@;jakarta.apache.org>

Reply via email to