vmassol     2002/10/18 09:12:37

  Modified:    Eclipse-Plugin/src/java/org/apache/cactus/eclipse/launcher
                        CactusLaunchConfiguration.java
  Log:
  revert back overwite from Julien ...
  
  Revision  Changes    Path
  1.6       +33 -42    
jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/launcher/CactusLaunchConfiguration.java
  
  Index: CactusLaunchConfiguration.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/launcher/CactusLaunchConfiguration.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CactusLaunchConfiguration.java    18 Oct 2002 16:03:32 -0000      1.5
  +++ CactusLaunchConfiguration.java    18 Oct 2002 16:12:37 -0000      1.6
  @@ -86,31 +86,29 @@
   import org.eclipse.jdt.launching.sourcelookup.JavaSourceLocator;
   
   /**
  - *
  - * This class contains the configuration for the VM that will actually launch the 
cactus tests.
  + * This class contains the configuration for the VM that will actually launch 
  + * the cactus tests.
    * 
    * @version $Id$
    * @author <a href="mailto:jruaux@;octo.com">Julien Ruaux</a>
  + * @author <a href="mailto:vmassol@;apache.org">Vincent Massol</a>
    */
   public class CactusLaunchConfiguration extends JUnitLaunchConfiguration
   {
  -
  -    public static final String ID_CACTUS_APPLICATION =
  +    public static final String ID_CACTUS_APPLICATION = 
           "org.apache.cactus.eclipse.launchconfig";
   
       /**
        * @see 
org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(ILaunchConfiguration, 
String, ILaunch, IProgressMonitor)
        */
  -    public void launch(ILaunchConfiguration configuration, String mode,
  +    public void launch(ILaunchConfiguration Configuration, String Mode,
           ILaunch launch, IProgressMonitor pm) throws CoreException
       {
           IJavaProject javaProject = getJavaProject(configuration);
           if ((javaProject == null) || !javaProject.exists())
           {
  -            abort(
  -                JUnitMessages.getString(
  -                    "JUnitBaseLaunchConfiguration.error.invalidproject"),
  -                null,
  +            abort(JUnitMessages.getString(
  +                "JUnitBaseLaunchConfiguration.error.invalidproject"), null, 
                   IJavaLaunchConfigurationConstants.ERR_NOT_A_JAVA_PROJECT);
           }
   
  @@ -118,14 +116,12 @@
           IVMInstallType type = getVMInstallType(configuration);
           IVMInstall install = getVMInstall(configuration);
           IVMRunner runner = install.getVMRunner(mode);
  +
           if (runner == null)
           {
  -            abort(
  -                MessageFormat.format(
  -                    JUnitMessages.getString(
  -                        "JUnitBaseLaunchConfiguration.error.novmrunner"),
  -                    new String[] { install.getId()}),
  -                null,
  +            abort(MessageFormat.format(JUnitMessages.getString(
  +                "JUnitBaseLaunchConfiguration.error.novmrunner"),
  +                new String[] { install.getId()}), null, 
                   IJavaLaunchConfigurationConstants.ERR_VM_RUNNER_DOES_NOT_EXIST);
           }
   
  @@ -187,40 +183,36 @@
        * @see 
org.eclipse.jdt.internal.junit.launcher.JUnitBaseLaunchConfiguration#createVMRunner(ILaunchConfiguration,
 IType[], int, String)
        */
       protected VMRunnerConfiguration createVMRunner(
  -        ILaunchConfiguration configuration,
  -        IType[] testTypes,
  -        int port,
  -        String runMode)
  -        throws CoreException
  +        ILaunchConfiguration configuration, IType[] testTypes, int port, 
  +        String runMode) throws CoreException
       {
           String[] classPath = createClassPath(configuration, testTypes[0]);
  -        VMRunnerConfiguration vmConfig =
  -            new VMRunnerConfiguration(
  -                "org.eclipse.jdt.internal.junit.runner.RemoteTestRunner",
  -                classPath);
  +        VMRunnerConfiguration vmConfig = new VMRunnerConfiguration(
  +            "org.eclipse.jdt.internal.junit.runner.RemoteTestRunner", 
  +            classPath);
   
           Vector argv = new Vector(10);
           argv.add("-port");
           argv.add(Integer.toString(port));
  -        //argv("-debugging");
           argv.add("-classNames");
   
  -        if (keepAlive(configuration)
  +        if (keepAlive(configuration) 
               && runMode.equals(ILaunchManager.DEBUG_MODE))
           {
               argv.add(0, "-keepalive");
           }
  -
  +        
           for (int i = 0; i < testTypes.length; i++)
           {
               argv.add(testTypes[i].getFullyQualifiedName());
           }
  -
  +        
           String[] args = new String[argv.size()];
           argv.copyInto(args);
           vmConfig.setProgramArguments(args);
   
  -        // We set a VM argument related to the Cactus framework (QQQ : get this 
from the plugin preference page)
  +        // We set a VM argument related to the Cactus framework (QQQ : get 
  +        // this from the plugin preference page).
           String[] vmArgs = { "-Dcactus.contextURL=http://localhost:8081/test"; };
           vmConfig.setVMArguments(vmArgs);
           return vmConfig;
  @@ -233,10 +225,8 @@
        * @return String[]
        * @throws CoreException
        */
  -    private String[] createClassPath(
  -        ILaunchConfiguration configuration,
  -        IType type)
  -        throws CoreException
  +    private String[] createClassPath(ILaunchConfiguration configuration, 
  +        IType type) throws CoreException
       {
           URL url = JUnitPlugin.getDefault().getDescriptor().getInstallURL();
           String[] cp = getClasspath(configuration);
  @@ -249,19 +239,20 @@
               if (inDevelopmentMode)
               {
                   // assumption is that the output folder is called bin!
  -                classPath[0] =
  -                    Platform.asLocalURL(new URL(url, "bin")).getFile();
  -            } else
  +                classPath[0] = Platform.asLocalURL(
  +                    new URL(url, "bin")).getFile();
  +            } 
  +            else
               {
  -                classPath[0] =
  -                    Platform
  -                        .asLocalURL(new URL(url, "junitsupport.jar"))
  -                        .getFile();
  +                classPath[0] = Platform.asLocalURL(
  +                    new URL(url, "junitsupport.jar")).getFile();
               }
  -        } catch (MalformedURLException e)
  +        } 
  +        catch (MalformedURLException e)
           {
               JUnitPlugin.log(e); // TO DO abort run and inform user
  -        } catch (IOException e)
  +        } 
  +        catch (IOException e)
           {
               JUnitPlugin.log(e); // TO DO abort run and inform user
           }
  
  
  

--
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