ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide VAJAntTool.java VAJAntToolGUI.java VAJBuildInfo.java VAJExport.java VAJExportServlet.java VAJImport.java VAJImportServlet.java VAJLoad.java VAJLoadProjects.java VAJLoadServlet.java VAJLocalUtil.java VAJProjectDescription.java VAJRemoteUtil.java VAJTask.java VAJToolsServlet.java VAJUtil.java VAJWorkspaceScanner.java
Date Sun, 16 Dec 2001 00:36:41 GMT
donaldp     01/12/15 16:36:41

  Modified:    proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide
                        VAJAntTool.java VAJAntToolGUI.java
                        VAJBuildInfo.java VAJExport.java
                        VAJExportServlet.java VAJImport.java
                        VAJImportServlet.java VAJLoad.java
                        VAJLoadProjects.java VAJLoadServlet.java
                        VAJLocalUtil.java VAJProjectDescription.java
                        VAJRemoteUtil.java VAJTask.java
                        VAJToolsServlet.java VAJUtil.java
                        VAJWorkspaceScanner.java
  Log:
  BuildException -> TaskException
  
  Removed uneeded imports.
  
  Processed code through style formatter.
  
  Revision  Changes    Path
  1.2       +9 -12     jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJAntTool.java
  
  Index: VAJAntTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJAntTool.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJAntTool.java	2001/12/15 12:06:27	1.1
  +++ VAJAntTool.java	2001/12/16 00:36:41	1.2
  @@ -6,10 +6,10 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ide;
  +
   import com.ibm.ivj.util.base.Project;
   import com.ibm.ivj.util.base.ToolData;
  -import org.apache.tools.ant.BuildException;
  -
  +import org.apache.myrmidon.api.TaskException;
   
   /**
    * This class is the equivalent to org.apache.tools.ant.Main for the VAJ tool
  @@ -24,7 +24,6 @@
   {
       private final static String TOOL_DATA_KEY = "AntTool";
   
  -
       /**
        * Loads the BuildInfo for the specified VAJ project from the tool data for
        * this project. If there is no build info stored for that project, a new
  @@ -43,7 +42,7 @@
               if( project.testToolRepositoryData( TOOL_DATA_KEY ) )
               {
                   ToolData td = project.getToolRepositoryData( TOOL_DATA_KEY );
  -                String data = ( String )td.getData();
  +                String data = (String)td.getData();
                   result = VAJBuildInfo.parse( data );
               }
               else
  @@ -54,13 +53,12 @@
           }
           catch( Throwable t )
           {
  -            throw new BuildException( "BuildInfo for Project "
  -                 + projectName + " could not be loaded" + t );
  +            throw new TaskException( "BuildInfo for Project "
  +                                     + projectName + " could not be loaded" + t );
           }
           return result;
       }
   
  -
       /**
        * Starts the application.
        *
  @@ -73,9 +71,9 @@
           try
           {
               VAJBuildInfo info;
  -            if( args.length >= 2 && args[1] instanceof String )
  +            if( args.length >= 2 && args[ 1 ] instanceof String )
               {
  -                String projectName = ( String )args[1];
  +                String projectName = (String)args[ 1 ];
                   info = loadBuildData( projectName );
               }
               else
  @@ -94,7 +92,6 @@
           }
       }
   
  -
       /**
        * Saves the BuildInfo for a project in the VAJ repository.
        *
  @@ -111,8 +108,8 @@
           }
           catch( Throwable t )
           {
  -            throw new BuildException( "BuildInfo for Project "
  -                 + info.getVAJProjectName() + " could not be saved", t );
  +            throw new TaskException( "BuildInfo for Project "
  +                                     + info.getVAJProjectName() + " could not be saved", t );
           }
       }
   }
  
  
  
  1.2       +35 -19    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJAntToolGUI.java
  
  Index: VAJAntToolGUI.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJAntToolGUI.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJAntToolGUI.java	2001/12/15 12:06:27	1.1
  +++ VAJAntToolGUI.java	2001/12/16 00:36:41	1.2
  @@ -6,6 +6,7 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ide;
  +
   import java.awt.BorderLayout;
   import java.awt.Button;
   import java.awt.Choice;
  @@ -36,11 +37,9 @@
   import java.awt.event.WindowEvent;
   import java.awt.event.WindowListener;
   import java.beans.PropertyChangeListener;
  -import java.io.PrintWriter;
  -import java.io.StringWriter;
   import java.util.Vector;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.BuildEvent;
  -import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.BuildListener;
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.util.StringUtils;
  @@ -182,14 +181,14 @@
           if( minutes > 0 )
           {
               return Long.toString( minutes ) + " minute"
  -                 + ( minutes == 1 ? " " : "s " )
  -                 + Long.toString( seconds % 60 ) + " second"
  -                 + ( seconds % 60 == 1 ? "" : "s" );
  +                + ( minutes == 1 ? " " : "s " )
  +                + Long.toString( seconds % 60 ) + " second"
  +                + ( seconds % 60 == 1 ? "" : "s" );
           }
           else
           {
               return Long.toString( seconds ) + " second"
  -                 + ( seconds % 60 == 1 ? "" : "s" );
  +                + ( seconds % 60 == 1 ? "" : "s" );
           }
       }
   
  @@ -1617,9 +1616,13 @@
                   connectTextFieldToBuildFileName();
           }
   
  -        public void windowActivated( WindowEvent e ) { }
  +        public void windowActivated( WindowEvent e )
  +        {
  +        }
   
  -        public void windowClosed( WindowEvent e ) { }
  +        public void windowClosed( WindowEvent e )
  +        {
  +        }
   
           /**
            * WindowListener methods
  @@ -1646,13 +1649,21 @@
               }
           }
   
  -        public void windowDeactivated( WindowEvent e ) { }
  +        public void windowDeactivated( WindowEvent e )
  +        {
  +        }
   
  -        public void windowDeiconified( WindowEvent e ) { }
  +        public void windowDeiconified( WindowEvent e )
  +        {
  +        }
   
  -        public void windowIconified( WindowEvent e ) { }
  +        public void windowIconified( WindowEvent e )
  +        {
  +        }
   
  -        public void windowOpened( WindowEvent e ) { }
  +        public void windowOpened( WindowEvent e )
  +        {
  +        }
       }
   
       /**
  @@ -1716,7 +1727,6 @@
               getMessageTextArea().append( lineSeparator );
           }
   
  -
           /**
            * Outputs an exception.
            *
  @@ -1726,11 +1736,11 @@
           {
               getMessageTextArea().append( lineSeparator + "BUILD FAILED" + lineSeparator );
   
  -            if( error instanceof BuildException )
  +            if( error instanceof TaskException )
               {
                   getMessageTextArea().append( error.toString() );
   
  -                Throwable nested = ( ( BuildException )error ).getCause();
  +                Throwable nested = ( (TaskException)error ).getCause();
                   if( nested != null )
                   {
                       nested.printStackTrace( System.err );
  @@ -1767,7 +1777,9 @@
            * @param event Description of Parameter
            * @see BuildEvent#getException()
            */
  -        public void targetFinished( BuildEvent event ) { }
  +        public void targetFinished( BuildEvent event )
  +        {
  +        }
   
           /**
            * Fired when a target is started.
  @@ -1790,7 +1802,9 @@
            * @param event Description of Parameter
            * @see BuildEvent#getException()
            */
  -        public void taskFinished( BuildEvent event ) { }
  +        public void taskFinished( BuildEvent event )
  +        {
  +        }
   
           /**
            * Fired when a task is started.
  @@ -1798,6 +1812,8 @@
            * @param event Description of Parameter
            * @see BuildEvent#getTask()
            */
  -        public void taskStarted( BuildEvent event ) { }
  +        public void taskStarted( BuildEvent event )
  +        {
  +        }
       }
   }
  
  
  
  1.2       +8 -9      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJBuildInfo.java
  
  Index: VAJBuildInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJBuildInfo.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJBuildInfo.java	2001/12/15 12:06:27	1.1
  +++ VAJBuildInfo.java	2001/12/16 00:36:41	1.2
  @@ -6,14 +6,15 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ide;
  +
   import java.beans.PropertyChangeListener;
   import java.beans.PropertyChangeSupport;
   import java.io.File;
   import java.util.Enumeration;
   import java.util.StringTokenizer;
   import java.util.Vector;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.BuildEvent;
  -import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.BuildListener;
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.ProjectHelper;
  @@ -106,7 +107,7 @@
           int res = names.size();
           for( int i = 0; i < names.size() && res == names.size(); i++ )
           {
  -            if( name.compareTo( ( String )names.elementAt( i ) ) < 0 )
  +            if( name.compareTo( (String)names.elementAt( i ) ) < 0 )
               {
                   res = i;
               }
  @@ -137,7 +138,7 @@
           int oldValue = outputMessageLevel;
           outputMessageLevel = newOutputMessageLevel;
           firePropertyChange( "outputMessageLevel",
  -            new Integer( oldValue ), new Integer( outputMessageLevel ) );
  +                            new Integer( oldValue ), new Integer( outputMessageLevel ) );
       }
   
       /**
  @@ -225,7 +226,6 @@
           return projectInitialized;
       }
   
  -
       /**
        * The addPropertyChangeListener method was generated to support the
        * propertyChange field.
  @@ -247,9 +247,9 @@
       public String asDataString()
       {
           String result = getOutputMessageLevel() + "|" + getBuildFileName()
  -             + "|" + getTarget();
  +            + "|" + getTarget();
           for( Enumeration e = getProjectTargets().elements();
  -            e.hasMoreElements();  )
  +             e.hasMoreElements(); )
           {
               result = result + "|" + e.nextElement();
           }
  @@ -257,7 +257,6 @@
           return result;
       }
   
  -
       /**
        * cancels a build.
        */
  @@ -368,7 +367,7 @@
           Enumeration ptargets = project.getTargets().elements();
           while( ptargets.hasMoreElements() )
           {
  -            Target currentTarget = ( Target )ptargets.nextElement();
  +            Target currentTarget = (Target)ptargets.nextElement();
               if( currentTarget.getDescription() != null )
               {
                   String targetName = currentTarget.getName();
  @@ -460,7 +459,7 @@
        *
        * @author RT
        */
  -    public static class BuildInterruptedException extends BuildException
  +    public static class BuildInterruptedException extends TaskException
       {
           public String toString()
           {
  
  
  
  1.2       +10 -9     jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJExport.java
  
  Index: VAJExport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJExport.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJExport.java	2001/12/15 12:06:27	1.1
  +++ VAJExport.java	2001/12/16 00:36:41	1.2
  @@ -6,8 +6,9 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ide;
  +
   import java.io.File;
  -import org.apache.tools.ant.BuildException;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.types.PatternSet;
   
   /**
  @@ -160,24 +161,24 @@
       /**
        * do the export
        *
  -     * @exception BuildException Description of Exception
  +     * @exception TaskException Description of Exception
        */
       public void execute()
  -        throws BuildException
  +        throws TaskException
       {
           // first off, make sure that we've got a destdir
           if( destDir == null )
           {
  -            throw new BuildException( "destdir attribute must be set!" );
  +            throw new TaskException( "destdir attribute must be set!" );
           }
   
           // delegate the export to the VAJUtil object.
           getUtil().exportPackages( destDir,
  -            patternSet.getIncludePatterns( getProject() ),
  -            patternSet.getExcludePatterns( getProject() ),
  -            exportClasses, exportDebugInfo,
  -            exportResources, exportSources,
  -            useDefaultExcludes, overwrite );
  +                                  patternSet.getIncludePatterns( getProject() ),
  +                                  patternSet.getExcludePatterns( getProject() ),
  +                                  exportClasses, exportDebugInfo,
  +                                  exportResources, exportSources,
  +                                  useDefaultExcludes, overwrite );
       }
   
   }
  
  
  
  1.2       +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJExportServlet.java
  
  Index: VAJExportServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJExportServlet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJExportServlet.java	2001/12/15 12:06:27	1.1
  +++ VAJExportServlet.java	2001/12/16 00:36:41	1.2
  @@ -6,6 +6,7 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ide;
  +
   import java.io.File;
   
   /**
  @@ -251,6 +252,6 @@
               getBooleanParam( SOURCES_PARAM, true ),
               getBooleanParam( DEFAULT_EXCLUDES_PARAM, true ),
               getBooleanParam( OVERWRITE_PARAM, true )
  -             );
  +        );
       }
   }
  
  
  
  1.2       +15 -15    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJImport.java
  
  Index: VAJImport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJImport.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJImport.java	2001/12/15 12:06:27	1.1
  +++ VAJImport.java	2001/12/16 00:36:41	1.2
  @@ -6,10 +6,11 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ide;
  +
   import java.lang.reflect.Field;
   import java.util.Enumeration;
   import java.util.Vector;
  -import org.apache.tools.ant.BuildException;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.DirectoryScanner;
   import org.apache.tools.ant.types.FileSet;
   
  @@ -172,7 +173,6 @@
           this.importSources = importSources;
       }
   
  -
       /**
        * The VisualAge for Java Project name to import into.
        *
  @@ -196,24 +196,24 @@
       /**
        * Do the import.
        *
  -     * @exception BuildException Description of Exception
  +     * @exception TaskException Description of Exception
        */
       public void execute()
  -        throws BuildException
  +        throws TaskException
       {
           if( filesets.size() == 0 )
           {
  -            throw new BuildException( "At least one fileset is required!" );
  +            throw new TaskException( "At least one fileset is required!" );
           }
   
           if( importProject == null || "".equals( importProject ) )
           {
  -            throw new BuildException( "The VisualAge for Java Project name is required!" );
  +            throw new TaskException( "The VisualAge for Java Project name is required!" );
           }
   
  -        for( Enumeration e = filesets.elements(); e.hasMoreElements();  )
  +        for( Enumeration e = filesets.elements(); e.hasMoreElements(); )
           {
  -            importFileset( ( FileSet )e.nextElement() );
  +            importFileset( (FileSet)e.nextElement() );
           }
       }
   
  @@ -243,26 +243,26 @@
   
               Field includesField = directoryScanner.getDeclaredField( "includes" );
               includesField.setAccessible( true );
  -            includes = ( String[] )includesField.get( ds );
  +            includes = (String[])includesField.get( ds );
   
               Field excludesField = directoryScanner.getDeclaredField( "excludes" );
               excludesField.setAccessible( true );
  -            excludes = ( String[] )excludesField.get( ds );
  +            excludes = (String[])excludesField.get( ds );
           }
           catch( NoSuchFieldException nsfe )
           {
  -            throw new BuildException(
  +            throw new TaskException(
                   "DirectoryScanner.includes or .excludes missing" + nsfe.getMessage() );
           }
           catch( IllegalAccessException iae )
           {
  -            throw new BuildException(
  +            throw new TaskException(
                   "Access to DirectoryScanner.includes or .excludes not allowed" );
           }
   
           getUtil().importFiles( importProject, ds.getBasedir(),
  -            includes, excludes,
  -            importClasses, importResources, importSources,
  -            useDefaultExcludes );
  +                               includes, excludes,
  +                               importClasses, importResources, importSources,
  +                               useDefaultExcludes );
       }
   }
  
  
  
  1.2       +4 -4      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJImportServlet.java
  
  Index: VAJImportServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJImportServlet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJImportServlet.java	2001/12/15 12:06:27	1.1
  +++ VAJImportServlet.java	2001/12/16 00:36:41	1.2
  @@ -6,8 +6,8 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ide;
  -import java.io.File;
   
  +import java.io.File;
   
   /**
    * A Remote Access to Tools Servlet to import a Project from files into the
  @@ -71,8 +71,8 @@
               getBooleanParam( RESOURCES_PARAM, true ),
               getBooleanParam( SOURCES_PARAM, true ),
               false// no default excludes, because they
  -        // are already added on client side
  -        //            getBooleanParam(DEFAULT_EXCLUDES_PARAM, true)
  -         );
  +            // are already added on client side
  +            //            getBooleanParam(DEFAULT_EXCLUDES_PARAM, true)
  +        );
       }
   }
  
  
  
  1.2       +1 -0      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLoad.java
  
  Index: VAJLoad.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLoad.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJLoad.java	2001/12/15 12:06:27	1.1
  +++ VAJLoad.java	2001/12/16 00:36:41	1.2
  @@ -6,6 +6,7 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ide;
  +
   import java.util.Vector;
   
   /**
  
  
  
  1.2       +0 -5      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLoadProjects.java
  
  Index: VAJLoadProjects.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLoadProjects.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJLoadProjects.java	2001/12/15 12:06:27	1.1
  +++ VAJLoadProjects.java	2001/12/16 00:36:41	1.2
  @@ -7,11 +7,6 @@
    */
   package org.apache.tools.ant.taskdefs.optional.ide;
   
  -
  -
  -
  -
  -
   /**
    * This is only there for backward compatibility with the default task list and
    * will be removed soon
  
  
  
  1.2       +3 -2      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLoadServlet.java
  
  Index: VAJLoadServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLoadServlet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJLoadServlet.java	2001/12/15 12:06:27	1.1
  +++ VAJLoadServlet.java	2001/12/16 00:36:41	1.2
  @@ -6,6 +6,7 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ide;
  +
   import java.util.Vector;
   
   /**
  @@ -73,8 +74,8 @@
           for( int i = 0; i < projectNames.length && i < versionNames.length; i++ )
           {
               VAJProjectDescription desc = new VAJProjectDescription();
  -            desc.setName( projectNames[i] );
  -            desc.setVersion( versionNames[i] );
  +            desc.setName( projectNames[ i ] );
  +            desc.setVersion( versionNames[ i ] );
               projectDescriptions.addElement( desc );
           }
   
  
  
  
  1.3       +71 -74    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLocalUtil.java
  
  Index: VAJLocalUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLocalUtil.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- VAJLocalUtil.java	2001/12/15 14:55:58	1.2
  +++ VAJLocalUtil.java	2001/12/16 00:36:41	1.3
  @@ -6,6 +6,7 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ide;
  +
   import com.ibm.ivj.util.base.ExportCodeSpec;
   import com.ibm.ivj.util.base.ImportCodeSpec;
   import com.ibm.ivj.util.base.IvjException;
  @@ -18,13 +19,12 @@
   import java.io.File;
   import java.util.Enumeration;
   import java.util.Vector;
  -import org.apache.tools.ant.BuildException;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.DirectoryScanner;
   
  -
   /**
    * Helper class for VAJ tasks. Holds Workspace singleton and wraps IvjExceptions
  - * into BuildExceptions
  + * into TaskExceptions
    *
    * @author Wolf Siberski, TUI Infotec GmbH
    */
  @@ -46,7 +46,7 @@
   
           for( int i = 0; i < currentProjects.length; i++ )
           {
  -            Project p = currentProjects[i];
  +            Project p = currentProjects[ i ];
               if( p.getName().equals( importProject ) )
               {
                   found = p;
  @@ -62,8 +62,8 @@
               }
               catch( IvjException e )
               {
  -                throw createBuildException( "Error while creating Project "
  -                     + importProject + ": ", e );
  +                throw createTaskException( "Error while creating Project "
  +                                           + importProject + ": ", e );
               }
           }
   
  @@ -82,9 +82,9 @@
               workspace = ToolEnv.connectToWorkspace();
               if( workspace == null )
               {
  -                throw new BuildException(
  +                throw new TaskException(
                       "Unable to connect to Workspace! "
  -                     + "Make sure you are running in VisualAge for Java." );
  +                    + "Make sure you are running in VisualAge for Java." );
               }
           }
   
  @@ -92,14 +92,14 @@
       }
   
       /**
  -     * Wraps IvjException into a BuildException
  +     * Wraps IvjException into a TaskException
        *
        * @param errMsg Additional error message
        * @param e IvjException which is wrapped
  -     * @return org.apache.tools.ant.BuildException
  +     * @return org.apache.tools.ant.TaskException
        */
  -    static BuildException createBuildException(
  -                                                String errMsg, IvjException e )
  +    static TaskException createTaskException(
  +        String errMsg, IvjException e )
       {
           errMsg = errMsg + "\n" + e.getMessage();
           String[] errors = e.getErrors();
  @@ -107,10 +107,10 @@
           {
               for( int i = 0; i < errors.length; i++ )
               {
  -                errMsg = errMsg + "\n" + errors[i];
  +                errMsg = errMsg + "\n" + errors[ i ];
               }
           }
  -        return new BuildException( errMsg, e );
  +        return new TaskException( errMsg, e );
       }
   
   
  @@ -132,11 +132,11 @@
        * @param overwrite Description of Parameter
        */
       public void exportPackages(
  -                                File dest,
  -                                String[] includePatterns, String[] excludePatterns,
  -                                boolean exportClasses, boolean exportDebugInfo,
  -                                boolean exportResources, boolean exportSources,
  -                                boolean useDefaultExcludes, boolean overwrite )
  +        File dest,
  +        String[] includePatterns, String[] excludePatterns,
  +        boolean exportClasses, boolean exportDebugInfo,
  +        boolean exportResources, boolean exportSources,
  +        boolean useDefaultExcludes, boolean overwrite )
       {
           if( includePatterns == null || includePatterns.length == 0 )
           {
  @@ -162,7 +162,7 @@
                        + dest, MSG_INFO );
                   for( int i = 0; i < packages.length; i++ )
                   {
  -                    log( "    " + packages[i].getName(), MSG_VERBOSE );
  +                    log( "    " + packages[ i ].getName(), MSG_VERBOSE );
                   }
   
                   ExportCodeSpec exportSpec = new ExportCodeSpec();
  @@ -179,7 +179,7 @@
               }
               catch( IvjException ex )
               {
  -                throw createBuildException( "Exporting failed!", ex );
  +                throw createTaskException( "Exporting failed!", ex );
               }
           }
       }
  @@ -201,20 +201,20 @@
        * @param importResources Description of Parameter
        * @param importSources Description of Parameter
        * @param useDefaultExcludes Description of Parameter
  -     * @exception BuildException Description of Exception
  +     * @exception TaskException Description of Exception
        */
       public void importFiles(
  -                             String importProject, File srcDir,
  -                             String[] includePatterns, String[] excludePatterns,
  -                             boolean importClasses, boolean importResources,
  -                             boolean importSources, boolean useDefaultExcludes )
  -        throws BuildException
  +        String importProject, File srcDir,
  +        String[] includePatterns, String[] excludePatterns,
  +        boolean importClasses, boolean importResources,
  +        boolean importSources, boolean useDefaultExcludes )
  +        throws TaskException
       {
   
           if( importProject == null || "".equals( importProject ) )
           {
  -            throw new BuildException( "The VisualAge for Java project "
  -                 + "name is required!" );
  +            throw new TaskException( "The VisualAge for Java project "
  +                                     + "name is required!" );
           }
   
           ImportCodeSpec importSpec = new ImportCodeSpec();
  @@ -253,24 +253,24 @@
               Type[] importedTypes = getWorkspace().importData( importSpec );
               if( importedTypes == null )
               {
  -                throw new BuildException( "Unable to import into Workspace!" );
  +                throw new TaskException( "Unable to import into Workspace!" );
               }
               else
               {
                   log( importedTypes.length + " types imported", MSG_DEBUG );
                   for( int i = 0; i < importedTypes.length; i++ )
                   {
  -                    log( importedTypes[i].getPackage().getName()
  -                         + "." + importedTypes[i].getName()
  -                         + " into " + importedTypes[i].getProject().getName(),
  -                        MSG_DEBUG );
  +                    log( importedTypes[ i ].getPackage().getName()
  +                         + "." + importedTypes[ i ].getName()
  +                         + " into " + importedTypes[ i ].getProject().getName(),
  +                         MSG_DEBUG );
                   }
               }
           }
           catch( IvjException ivje )
           {
  -            throw createBuildException( "Error while importing into workspace: ",
  -                ivje );
  +            throw createTaskException( "Error while importing into workspace: ",
  +                                       ivje );
           }
       }
   
  @@ -289,9 +289,9 @@
           Vector expandedDescs = getExpandedDescriptions( projectDescriptions );
   
           // output warnings for projects not found
  -        for( Enumeration e = projectDescriptions.elements(); e.hasMoreElements();  )
  +        for( Enumeration e = projectDescriptions.elements(); e.hasMoreElements(); )
           {
  -            VAJProjectDescription d = ( VAJProjectDescription )e.nextElement();
  +            VAJProjectDescription d = (VAJProjectDescription)e.nextElement();
               if( !d.projectFound() )
               {
                   log( "No Projects match the name " + d.getName(), MSG_WARN );
  @@ -302,9 +302,9 @@
                + " project(s) into workspace", MSG_INFO );
   
           for( Enumeration e = expandedDescs.elements();
  -            e.hasMoreElements();  )
  +             e.hasMoreElements(); )
           {
  -            VAJProjectDescription d = ( VAJProjectDescription )e.nextElement();
  +            VAJProjectDescription d = (VAJProjectDescription)e.nextElement();
   
               ProjectEdition pe = findProjectEdition( d.getName(), d.getVersion() );
               try
  @@ -315,13 +315,12 @@
               }
               catch( IvjException ex )
               {
  -                throw createBuildException( "Project '" + d.getName()
  -                     + "' could not be loaded.", ex );
  +                throw createTaskException( "Project '" + d.getName()
  +                                           + "' could not be loaded.", ex );
               }
           }
       }
   
  -
       /**
        * return project descriptions containing full project names instead of
        * patterns with wildcards.
  @@ -339,15 +338,15 @@
               for( int i = 0; i < projectNames.length; i++ )
               {
                   for( Enumeration e = projectDescs.elements();
  -                    e.hasMoreElements();  )
  +                     e.hasMoreElements(); )
                   {
  -                    VAJProjectDescription d = ( VAJProjectDescription )e.nextElement();
  +                    VAJProjectDescription d = (VAJProjectDescription)e.nextElement();
                       String pattern = d.getName();
  -                    if( VAJWorkspaceScanner.match( pattern, projectNames[i] ) )
  +                    if( VAJWorkspaceScanner.match( pattern, projectNames[ i ] ) )
                       {
                           d.setProjectFound();
                           expandedDescs.addElement( new VAJProjectDescription(
  -                            projectNames[i], d.getVersion() ) );
  +                            projectNames[ i ], d.getVersion() ) );
                           break;
                       }
                   }
  @@ -355,7 +354,7 @@
           }
           catch( IvjException e )
           {
  -            throw createBuildException( "VA Exception occured: ", e );
  +            throw createTaskException( "VA Exception occured: ", e );
           }
   
           return expandedDescs;
  @@ -371,14 +370,14 @@
        * @param summaryLog buffer for logging
        */
       private void addFilesToImport(
  -                                   ImportCodeSpec spec, boolean doImport,
  -                                   Vector files, String fileType,
  -                                   StringBuffer summaryLog )
  +        ImportCodeSpec spec, boolean doImport,
  +        Vector files, String fileType,
  +        StringBuffer summaryLog )
       {
   
           if( doImport )
           {
  -            String[] fileArr = new String[files.size()];
  +            String[] fileArr = new String[ files.size() ];
               files.copyInto( fileArr );
               try
               {
  @@ -392,7 +391,7 @@
               }
               catch( Exception e )
               {
  -                throw new BuildException( "Error", e );
  +                throw new TaskException( "Error", e );
               }
               if( files.size() > 0 )
               {
  @@ -419,15 +418,15 @@
           }
           catch( IvjException e )
           {
  -            throw createBuildException( "VA Exception occured: ", e );
  +            throw createTaskException( "VA Exception occured: ", e );
           }
   
           Vector matchingProjects = new Vector();
           for( int i = 0; i < projectNames.length; i++ )
           {
  -            if( VAJWorkspaceScanner.match( pattern, projectNames[i] ) )
  +            if( VAJWorkspaceScanner.match( pattern, projectNames[ i ] ) )
               {
  -                matchingProjects.addElement( projectNames[i] );
  +                matchingProjects.addElement( projectNames[ i ] );
               }
           }
   
  @@ -442,7 +441,7 @@
        * @return com.ibm.ivj.util.base.ProjectEdition the specified edition
        */
       private ProjectEdition findProjectEdition(
  -                                               String name, String versionName )
  +        String name, String versionName )
       {
           try
           {
  @@ -451,27 +450,27 @@
   
               if( editions == null )
               {
  -                throw new BuildException( "Project " + name + " doesn't exist" );
  +                throw new TaskException( "Project " + name + " doesn't exist" );
               }
   
               ProjectEdition pe = null;
               for( int i = 0; i < editions.length && pe == null; i++ )
               {
  -                if( versionName.equals( editions[i].getVersionName() ) )
  +                if( versionName.equals( editions[ i ].getVersionName() ) )
                   {
  -                    pe = editions[i];
  +                    pe = editions[ i ];
                   }
               }
               if( pe == null )
               {
  -                throw new BuildException( "Version " + versionName
  -                     + " of Project " + name + " doesn't exist" );
  +                throw new TaskException( "Version " + versionName
  +                                         + " of Project " + name + " doesn't exist" );
               }
               return pe;
           }
           catch( IvjException e )
           {
  -            throw createBuildException( "VA Exception occured: ", e );
  +            throw createTaskException( "VA Exception occured: ", e );
           }
   
       }
  @@ -485,13 +484,12 @@
       private void logFiles( Vector fileNames, String fileType )
       {
           log( fileType + " files found for import:", MSG_VERBOSE );
  -        for( Enumeration e = fileNames.elements(); e.hasMoreElements();  )
  +        for( Enumeration e = fileNames.elements(); e.hasMoreElements(); )
           {
               log( "    " + e.nextElement(), MSG_VERBOSE );
           }
       }
   
  -
       /**
        * Sort the files into classes, sources, and resources.
        *
  @@ -502,28 +500,27 @@
        * @param resources Description of Parameter
        */
       private void scanForImport(
  -                                File dir,
  -                                String[] files,
  -                                Vector classes,
  -                                Vector sources,
  -                                Vector resources )
  +        File dir,
  +        String[] files,
  +        Vector classes,
  +        Vector sources,
  +        Vector resources )
       {
           for( int i = 0; i < files.length; i++ )
           {
  -            String file = ( new File( dir, files[i] ) ).getAbsolutePath();
  +            String file = ( new File( dir, files[ i ] ) ).getAbsolutePath();
               if( file.endsWith( ".java" ) || file.endsWith( ".JAVA" ) )
               {
                   sources.addElement( file );
               }
  -            else
  -                if( file.endsWith( ".class" ) || file.endsWith( ".CLASS" ) )
  +            else if( file.endsWith( ".class" ) || file.endsWith( ".CLASS" ) )
               {
                   classes.addElement( file );
               }
               else
               {
                   // for resources VA expects the path relative to the resource path
  -                resources.addElement( files[i] );
  +                resources.addElement( files[ i ] );
               }
           }
       }
  
  
  
  1.2       +7 -4      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJProjectDescription.java
  
  Index: VAJProjectDescription.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJProjectDescription.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJProjectDescription.java	2001/12/15 12:06:27	1.1
  +++ VAJProjectDescription.java	2001/12/16 00:36:41	1.2
  @@ -6,8 +6,9 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ide;
  -import org.apache.tools.ant.BuildException;
   
  +import org.apache.myrmidon.api.TaskException;
  +
   /**
    * Type class. Holds information about a project edition.
    *
  @@ -20,7 +21,9 @@
       private boolean projectFound;
       private String version;
   
  -    public VAJProjectDescription() { }
  +    public VAJProjectDescription()
  +    {
  +    }
   
       public VAJProjectDescription( String n, String v )
       {
  @@ -32,7 +35,7 @@
       {
           if( newName == null || newName.equals( "" ) )
           {
  -            throw new BuildException( "name attribute must be set" );
  +            throw new TaskException( "name attribute must be set" );
           }
           name = newName;
       }
  @@ -46,7 +49,7 @@
       {
           if( newVersion == null || newVersion.equals( "" ) )
           {
  -            throw new BuildException( "version attribute must be set" );
  +            throw new TaskException( "version attribute must be set" );
           }
           version = newVersion;
       }
  
  
  
  1.3       +43 -42    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJRemoteUtil.java
  
  Index: VAJRemoteUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJRemoteUtil.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- VAJRemoteUtil.java	2001/12/15 14:55:58	1.2
  +++ VAJRemoteUtil.java	2001/12/16 00:36:41	1.3
  @@ -6,6 +6,7 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ide;
  +
   import java.io.BufferedReader;
   import java.io.File;
   import java.io.IOException;
  @@ -15,12 +16,12 @@
   import java.net.URL;
   import java.util.Enumeration;
   import java.util.Vector;
  -import org.apache.tools.ant.BuildException;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.Task;
   
   /**
    * Helper class for VAJ tasks. Holds Workspace singleton and wraps IvjExceptions
  - * into BuildExceptions
  + * into TaskExceptions
    *
    * @author Wolf Siberski, TUI Infotec GmbH
    */
  @@ -59,17 +60,17 @@
           try
           {
               String request = "http://" + remoteServer + "/servlet/vajexport?"
  -                 + VAJExportServlet.WITH_DEBUG_INFO + "=" + exportDebugInfo + "&"
  -                 + VAJExportServlet.OVERWRITE_PARAM + "=" + overwrite + "&"
  -                 + assembleImportExportParams( destDir,
  -                includePatterns, excludePatterns,
  -                exportClasses, exportResources,
  -                exportSources, useDefaultExcludes );
  +                + VAJExportServlet.WITH_DEBUG_INFO + "=" + exportDebugInfo + "&"
  +                + VAJExportServlet.OVERWRITE_PARAM + "=" + overwrite + "&"
  +                + assembleImportExportParams( destDir,
  +                                              includePatterns, excludePatterns,
  +                                              exportClasses, exportResources,
  +                                              exportSources, useDefaultExcludes );
               sendRequest( request );
           }
           catch( Exception ex )
           {
  -            throw new BuildException( "Error", ex );
  +            throw new TaskException( "Error", ex );
           }
       }
   
  @@ -86,25 +87,25 @@
        * @param useDefaultExcludes Description of Parameter
        */
       public void importFiles(
  -                             String importProject, File srcDir,
  -                             String[] includePatterns, String[] excludePatterns,
  -                             boolean importClasses, boolean importResources,
  -                             boolean importSources, boolean useDefaultExcludes )
  +        String importProject, File srcDir,
  +        String[] includePatterns, String[] excludePatterns,
  +        boolean importClasses, boolean importResources,
  +        boolean importSources, boolean useDefaultExcludes )
       {
           try
           {
               String request = "http://" + remoteServer + "/servlet/vajimport?"
  -                 + VAJImportServlet.PROJECT_NAME_PARAM + "="
  -                 + importProject + "&"
  -                 + assembleImportExportParams( srcDir,
  -                includePatterns, excludePatterns,
  -                importClasses, importResources,
  -                importSources, useDefaultExcludes );
  +                + VAJImportServlet.PROJECT_NAME_PARAM + "="
  +                + importProject + "&"
  +                + assembleImportExportParams( srcDir,
  +                                              includePatterns, excludePatterns,
  +                                              importClasses, importResources,
  +                                              importSources, useDefaultExcludes );
               sendRequest( request );
           }
           catch( Exception ex )
           {
  -            throw new BuildException( "Error", ex );
  +            throw new TaskException( "Error", ex );
           }
   
       }
  @@ -120,14 +121,14 @@
           {
               String request = "http://" + remoteServer + "/servlet/vajload?";
               String delimiter = "";
  -            for( Enumeration e = projectDescriptions.elements(); e.hasMoreElements();  )
  +            for( Enumeration e = projectDescriptions.elements(); e.hasMoreElements(); )
               {
  -                VAJProjectDescription pd = ( VAJProjectDescription )e.nextElement();
  +                VAJProjectDescription pd = (VAJProjectDescription)e.nextElement();
                   request = request
  -                     + delimiter + VAJLoadServlet.PROJECT_NAME_PARAM
  -                     + "=" + pd.getName().replace( ' ', '+' )
  -                     + "&" + VAJLoadServlet.VERSION_PARAM
  -                     + "=" + pd.getVersion().replace( ' ', '+' );
  +                    + delimiter + VAJLoadServlet.PROJECT_NAME_PARAM
  +                    + "=" + pd.getName().replace( ' ', '+' )
  +                    + "&" + VAJLoadServlet.VERSION_PARAM
  +                    + "=" + pd.getVersion().replace( ' ', '+' );
                   //the first param needs no delimiter, but all other
                   delimiter = "&";
               }
  @@ -135,7 +136,7 @@
           }
           catch( Exception ex )
           {
  -            throw new BuildException( "Error", ex );
  +            throw new TaskException( "Error", ex );
           }
       }
   
  @@ -164,25 +165,25 @@
        * @return Description of the Returned Value
        */
       private String assembleImportExportParams(
  -                                               File dir,
  -                                               String[] includePatterns, String[] excludePatterns,
  -                                               boolean includeClasses, boolean includeResources,
  -                                               boolean includeSources, boolean useDefaultExcludes )
  +        File dir,
  +        String[] includePatterns, String[] excludePatterns,
  +        boolean includeClasses, boolean includeResources,
  +        boolean includeSources, boolean useDefaultExcludes )
       {
           String result =
               VAJToolsServlet.DIR_PARAM + "="
  -             + dir.getAbsolutePath().replace( '\\', '/' ) + "&"
  -             + VAJToolsServlet.CLASSES_PARAM + "=" + includeClasses + "&"
  -             + VAJToolsServlet.RESOURCES_PARAM + "=" + includeResources + "&"
  -             + VAJToolsServlet.SOURCES_PARAM + "=" + includeSources + "&"
  -             + VAJToolsServlet.DEFAULT_EXCLUDES_PARAM + "=" + useDefaultExcludes;
  +            + dir.getAbsolutePath().replace( '\\', '/' ) + "&"
  +            + VAJToolsServlet.CLASSES_PARAM + "=" + includeClasses + "&"
  +            + VAJToolsServlet.RESOURCES_PARAM + "=" + includeResources + "&"
  +            + VAJToolsServlet.SOURCES_PARAM + "=" + includeSources + "&"
  +            + VAJToolsServlet.DEFAULT_EXCLUDES_PARAM + "=" + useDefaultExcludes;
   
           if( includePatterns != null )
           {
               for( int i = 0; i < includePatterns.length; i++ )
               {
                   result = result + "&" + VAJExportServlet.INCLUDE_PARAM + "="
  -                     + includePatterns[i].replace( ' ', '+' ).replace( '\\', '/' );
  +                    + includePatterns[ i ].replace( ' ', '+' ).replace( '\\', '/' );
               }
           }
           if( excludePatterns != null )
  @@ -190,7 +191,7 @@
               for( int i = 0; i < excludePatterns.length; i++ )
               {
                   result = result + "&" + VAJExportServlet.EXCLUDE_PARAM + "="
  -                     + excludePatterns[i].replace( ' ', '+' ).replace( '\\', '/' );
  +                    + excludePatterns[ i ].replace( ' ', '+' ).replace( '\\', '/' );
               }
           }
   
  @@ -212,7 +213,7 @@
               //must be HTTP connection
               URL requestUrl = new URL( request );
               HttpURLConnection connection =
  -                ( HttpURLConnection )requestUrl.openConnection();
  +                (HttpURLConnection)requestUrl.openConnection();
   
               InputStream is = null;
               // retry three times
  @@ -230,7 +231,7 @@
               if( is == null )
               {
                   log( "Can't get " + request, MSG_ERR );
  -                throw new BuildException( "Couldn't execute " + request );
  +                throw new TaskException( "Couldn't execute " + request );
               }
   
               // log the response
  @@ -260,11 +261,11 @@
           catch( IOException ex )
           {
               log( "Error sending tool request to VAJ" + ex, MSG_ERR );
  -            throw new BuildException( "Couldn't execute " + request );
  +            throw new TaskException( "Couldn't execute " + request );
           }
           if( requestFailed )
           {
  -            throw new BuildException( "VAJ tool request failed" );
  +            throw new TaskException( "VAJ tool request failed" );
           }
       }
   }
  
  
  
  1.2       +2 -2      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJTask.java
  
  Index: VAJTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJTask.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJTask.java	2001/12/15 12:06:27	1.1
  +++ VAJTask.java	2001/12/16 00:36:41	1.2
  @@ -6,14 +6,15 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ide;
  +
   /**
    * Super class for all VAJ tasks. Contains common attributes (remoteServer) and
    * util methods
    *
    * @author: Wolf Siberski
    */
  -import org.apache.tools.ant.Task;
   
  +import org.apache.tools.ant.Task;
   
   public class VAJTask extends Task
   {
  @@ -33,7 +34,6 @@
       {
           this.remoteServer = remoteServer;
       }
  -
   
       /**
        * returns the VAJUtil implementation
  
  
  
  1.2       +10 -12    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJToolsServlet.java
  
  Index: VAJToolsServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJToolsServlet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJToolsServlet.java	2001/12/15 12:06:27	1.1
  +++ VAJToolsServlet.java	2001/12/16 00:36:41	1.2
  @@ -6,14 +6,13 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ide;
  +
   import java.io.IOException;
  -import java.io.PrintWriter;
  -import java.io.StringWriter;
   import javax.servlet.ServletException;
   import javax.servlet.http.HttpServlet;
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
  -import org.apache.tools.ant.BuildException;
  +import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.util.StringUtils;
   
   /**
  @@ -63,7 +62,7 @@
               initRequest();
               executeRequest();
           }
  -        catch( BuildException e )
  +        catch( TaskException e )
           {
               util.log( "Error occured: " + e.getMessage(), VAJUtil.MSG_ERR );
           }
  @@ -71,11 +70,11 @@
           {
               try
               {
  -                if( !( e instanceof BuildException ) )
  +                if( !( e instanceof TaskException ) )
                   {
                       String trace = StringUtils.getStackTrace( e );
                       util.log( "Program error in " + this.getClass().getName()
  -                         + ":\n" + trace, VAJUtil.MSG_ERR );
  +                              + ":\n" + trace, VAJUtil.MSG_ERR );
                   }
               }
               catch( Throwable t )
  @@ -84,7 +83,7 @@
               }
               finally
               {
  -                if( !( e instanceof BuildException ) )
  +                if( !( e instanceof TaskException ) )
                   {
                       throw new ServletException( e.getMessage() );
                   }
  @@ -137,7 +136,7 @@
           {
               return null;
           }
  -        return paramValuesArray[0];
  +        return paramValuesArray[ 0 ];
       }
   
       /**
  @@ -151,7 +150,6 @@
           return request.getParameterValues( param );
       }
   
  -
       /**
        * Execute the request by calling the appropriate VAJ tool API methods. This
        * method must be implemented by the concrete servlets
  @@ -219,15 +217,15 @@
                               nlPos = msg.length();
                           }
                           response.getWriter().println( Integer.toString( level )
  -                             + " " + msg.substring( i, nlPos ) );
  +                                                      + " " + msg.substring( i, nlPos ) );
                           i = nlPos + 1;
                       }
                   }
               }
               catch( IOException e )
               {
  -                throw new BuildException( "logging failed. msg was: "
  -                     + e.getMessage() );
  +                throw new TaskException( "logging failed. msg was: "
  +                                         + e.getMessage() );
               }
           }
       }
  
  
  
  1.2       +10 -9     jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJUtil.java
  
  Index: VAJUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJUtil.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJUtil.java	2001/12/15 12:06:27	1.1
  +++ VAJUtil.java	2001/12/16 00:36:41	1.2
  @@ -6,6 +6,7 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ide;
  +
   import java.io.File;
   import java.util.Vector;
   
  @@ -38,11 +39,11 @@
        * @param overwrite Description of Parameter
        */
       void exportPackages(
  -                         File dest,
  -                         String[] includePatterns, String[] excludePatterns,
  -                         boolean exportClasses, boolean exportDebugInfo,
  -                         boolean exportResources, boolean exportSources,
  -                         boolean useDefaultExcludes, boolean overwrite );
  +        File dest,
  +        String[] includePatterns, String[] excludePatterns,
  +        boolean exportClasses, boolean exportDebugInfo,
  +        boolean exportResources, boolean exportSources,
  +        boolean useDefaultExcludes, boolean overwrite );
   
       /**
        * Do the import.
  @@ -57,10 +58,10 @@
        * @param useDefaultExcludes Description of Parameter
        */
       void importFiles(
  -                      String importProject, File srcDir,
  -                      String[] includePatterns, String[] excludePatterns,
  -                      boolean importClasses, boolean importResources,
  -                      boolean importSources, boolean useDefaultExcludes );
  +        String importProject, File srcDir,
  +        String[] includePatterns, String[] excludePatterns,
  +        boolean importClasses, boolean importResources,
  +        boolean importSources, boolean useDefaultExcludes );
   
       /**
        * Load specified projects.
  
  
  
  1.2       +23 -23    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJWorkspaceScanner.java
  
  Index: VAJWorkspaceScanner.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJWorkspaceScanner.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VAJWorkspaceScanner.java	2001/12/15 12:06:27	1.1
  +++ VAJWorkspaceScanner.java	2001/12/16 00:36:41	1.2
  @@ -6,6 +6,7 @@
    * the LICENSE file.
    */
   package org.apache.tools.ant.taskdefs.optional.ide;
  +
   import com.ibm.ivj.util.base.IvjException;
   import com.ibm.ivj.util.base.Package;
   import com.ibm.ivj.util.base.Project;
  @@ -45,11 +46,11 @@
       // Patterns that should be excluded by default.
       private final static String[] DEFAULTEXCLUDES =
           {
  -        "IBM*/**",
  -        "Java class libraries/**",
  -        "Sun class libraries*/**",
  -        "JSP Page Compile Generated Code/**",
  -        "VisualAge*/**",
  +            "IBM*/**",
  +            "Java class libraries/**",
  +            "Sun class libraries*/**",
  +            "JSP Page Compile Generated Code/**",
  +            "VisualAge*/**",
           };
   
       // The packages that where found and matched at least
  @@ -80,10 +81,10 @@
       public Package[] getIncludedPackages()
       {
           int count = packagesIncluded.size();
  -        Package[] packages = new Package[count];
  +        Package[] packages = new Package[ count ];
           for( int i = 0; i < count; i++ )
           {
  -            packages[i] = ( Package )packagesIncluded.elementAt( i );
  +            packages[ i ] = (Package)packagesIncluded.elementAt( i );
           }
           return packages;
       }
  @@ -95,14 +96,14 @@
       {
           int excludesLength = excludes == null ? 0 : excludes.length;
           String[] newExcludes;
  -        newExcludes = new String[excludesLength + DEFAULTEXCLUDES.length];
  +        newExcludes = new String[ excludesLength + DEFAULTEXCLUDES.length ];
           if( excludesLength > 0 )
           {
               System.arraycopy( excludes, 0, newExcludes, 0, excludesLength );
           }
           for( int i = 0; i < DEFAULTEXCLUDES.length; i++ )
           {
  -            newExcludes[i + excludesLength] = DEFAULTEXCLUDES[i].
  +            newExcludes[ i + excludesLength ] = DEFAULTEXCLUDES[ i ].
                   replace( '/', File.separatorChar ).
                   replace( '\\', File.separatorChar );
           }
  @@ -123,11 +124,11 @@
           boolean allProjectsMatch = false;
           for( int i = 0; i < projects.length; i++ )
           {
  -            Project project = projects[i];
  +            Project project = projects[ i ];
               for( int j = 0; j < includes.length && !allProjectsMatch; j++ )
               {
                   StringTokenizer tok =
  -                    new StringTokenizer( includes[j], File.separator );
  +                    new StringTokenizer( includes[ j ], File.separator );
                   String projectNamePattern = tok.nextToken();
                   if( projectNamePattern.equals( "**" ) )
                   {
  @@ -135,8 +136,7 @@
                       // all projects match
                       allProjectsMatch = true;
                   }
  -                else
  -                    if( match( projectNamePattern, project.getName() ) )
  +                else if( match( projectNamePattern, project.getName() ) )
                   {
                       matchingProjects.addElement( project );
                       break;
  @@ -149,7 +149,7 @@
               matchingProjects = new Vector();
               for( int i = 0; i < projects.length; i++ )
               {
  -                matchingProjects.addElement( projects[i] );
  +                matchingProjects.addElement( projects[ i ] );
               }
           }
   
  @@ -165,19 +165,19 @@
           if( includes == null )
           {
               // No includes supplied, so set it to 'matches all'
  -            includes = new String[1];
  -            includes[0] = "**";
  +            includes = new String[ 1 ];
  +            includes[ 0 ] = "**";
           }
           if( excludes == null )
           {
  -            excludes = new String[0];
  +            excludes = new String[ 0 ];
           }
   
           // only scan projects which are included in at least one include pattern
           Vector matchingProjects = findMatchingProjects();
  -        for( Enumeration e = matchingProjects.elements(); e.hasMoreElements();  )
  +        for( Enumeration e = matchingProjects.elements(); e.hasMoreElements(); )
           {
  -            Project project = ( Project )e.nextElement();
  +            Project project = (Project)e.nextElement();
               scanProject( project );
           }
       }
  @@ -197,14 +197,14 @@
               {
                   for( int i = 0; i < packages.length; i++ )
                   {
  -                    Package item = packages[i];
  +                    Package item = packages[ i ];
                       // replace '.' by file seperator because the patterns are
                       // using file seperator syntax (and we can use the match
                       // methods this way).
                       String name =
                           project.getName()
  -                         + File.separator
  -                         + item.getName().replace( '.', File.separatorChar );
  +                        + File.separator
  +                        + item.getName().replace( '.', File.separatorChar );
                       if( isIncluded( name ) && !isExcluded( name ) )
                       {
                           packagesIncluded.addElement( item );
  @@ -214,7 +214,7 @@
           }
           catch( IvjException e )
           {
  -            throw VAJLocalUtil.createBuildException( "VA Exception occured: ", e );
  +            throw VAJLocalUtil.createTaskException( "VA Exception occured: ", e );
           }
       }
   }
  
  
  

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


Mime
View raw message