dion        2004/09/09 05:05:49

  Modified:    jelly/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant
                        JellyPropsHandler.java FileScanner.java
                        FileScannerTag.java AntTagLibrary.java
                        TaskSource.java SetPropertyTag.java
                        FileIterator.java
  Log:
  Fix license file whitespace
  
  Revision  Changes    Path
  1.8       +6 -6      
jakarta-commons/jelly/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant/JellyPropsHandler.java
  
  Index: JellyPropsHandler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/jelly/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant/JellyPropsHandler.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- JellyPropsHandler.java    10 Jul 2004 02:17:28 -0000      1.7
  +++ JellyPropsHandler.java    9 Sep 2004 12:05:48 -0000       1.8
  @@ -2,13 +2,13 @@
   
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -32,15 +32,15 @@
   
       /** The JellyContext. */
       private JellyContext context;
  -    
  +
       /** Simple constructor with the context to be used.
  -     * 
  +     *
        *  @param context The context to be used.
        */
       public JellyPropsHandler(JellyContext context) {
           this.context = context;
       }
  -    
  +
       /** Set an ant property.
        *
        *  @param name The property name.
  
  
  
  1.10      +9 -9      
jakarta-commons/jelly/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant/FileScanner.java
  
  Index: FileScanner.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/jelly/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant/FileScanner.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FileScanner.java  25 Feb 2004 01:23:59 -0000      1.9
  +++ FileScanner.java  9 Sep 2004 12:05:48 -0000       1.10
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -22,7 +22,7 @@
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.types.FileSet;
   
  -/** 
  +/**
    * <p><code>FileScanner</code> is a bean which allows the iteration
    * over a number of files from a colleciton of FileSet instances.
    *
  @@ -33,10 +33,10 @@
   
       /** FileSets */
       private List filesets = new ArrayList();
  -    
  +
       /** The Ant project */
       private Project project;
  -    
  +
       public void setProject(Project project)
       {
           this.project = project;
  @@ -52,7 +52,7 @@
   
       public boolean hasFiles() {
           return filesets.size() > 0;
  -    }        
  +    }
   
       /**
        * Clears any file sets that have been added to this scanner
  @@ -60,14 +60,14 @@
       public void clear() {
           filesets.clear();
       }
  -    
  +
       // Properties
       //-------------------------------------------------------------------------
   
       /**
        * Adds a set of files (nested fileset attribute).
        */
  -    public void addFileset(FileSet set) {   
  +    public void addFileset(FileSet set) {
           filesets.add(set);
       }
   
  
  
  
  1.13      +20 -20    
jakarta-commons/jelly/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant/FileScannerTag.java
  
  Index: FileScannerTag.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/jelly/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant/FileScannerTag.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- FileScannerTag.java       25 Feb 2004 01:23:59 -0000      1.12
  +++ FileScannerTag.java       9 Sep 2004 12:05:48 -0000       1.13
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -23,8 +23,8 @@
   import org.apache.commons.jelly.TagSupport;
   import org.apache.commons.jelly.XMLOutput;
   
  -/** 
  - * A tag which creates a new FileScanner bean instance that can be used to 
  +/**
  + * A tag which creates a new FileScanner bean instance that can be used to
    * iterate over fileSets
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">James Strachan</a>
  @@ -37,18 +37,18 @@
   
       /** the variable exported */
       private String var;
  -    
  +
       public FileScannerTag(FileScanner fileScanner) {
           this.fileScanner = fileScanner;
       }
   
       // Tag interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public void doTag(XMLOutput output) throws MissingAttributeException, 
JellyTagException {
           fileScanner.setProject(AntTagLibrary.getProject(context));
  -        
  +
           fileScanner.clear();
  -        
  +
           // run the body first to configure the task via nested
           invokeBody(output);
   
  @@ -56,16 +56,16 @@
           if ( var == null ) {
               throw new MissingAttributeException( "var" );
           }
  -        context.setVariable( var, fileScanner );        
  -        
  +        context.setVariable( var, fileScanner );
  +
       }
  -    
  +
       // TaskSource interface
  -    //------------------------------------------------------------------------- 
  +    //-------------------------------------------------------------------------
       public Object getTaskObject() {
           return fileScanner;
       }
  -    
  +
       /**
        * Allows nested tags to set a property on the task object of this tag
        */
  @@ -80,20 +80,20 @@
               throw new JellyTagException(ex);
           }
       }
  -    
  +
       // Properties
  -    //-------------------------------------------------------------------------     
           
  -    
  -    /** 
  +    //-------------------------------------------------------------------------
  +
  +    /**
        * @return the Ant task
        */
       public FileScanner getFileScanner() {
           return fileScanner;
       }
  -    
  +
       /** Sets the name of the variable exported by this tag */
       public void setVar(String var) {
           this.var = var;
       }
  -    
  +
   }
  
  
  
  1.32      +20 -20    
jakarta-commons/jelly/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant/AntTagLibrary.java
  
  Index: AntTagLibrary.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/jelly/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant/AntTagLibrary.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- AntTagLibrary.java        7 Sep 2004 01:51:09 -0000       1.31
  +++ AntTagLibrary.java        9 Sep 2004 12:05:48 -0000       1.32
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -36,7 +36,7 @@
   
   import org.xml.sax.Attributes;
   
  -/** 
  +/**
    * A Jelly custom tag library that allows Ant tasks to be called from inside Jelly.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">James Strachan</a>
  @@ -47,14 +47,14 @@
   
       /** The Log to which logging calls will be made. */
       private static final Log log = LogFactory.getLog(AntTagLibrary.class);
  -    
  +
       public static final String PROJECT_CONTEXT_HANDLE = 
"org.apache.commons.jelly.ant.Project";
   
       static {
   
           // register standard converters for Ant types
  -               
  -        
  +
  +
           ConvertUtils.register(
               new Converter() {
                   public Object convert(Class type, Object value) {
  @@ -70,7 +70,7 @@
               },
               Reference.class
               );
  -        
  +
           ConvertUtils.register(
               new Converter() {
                   public Object convert(Class type, Object value) {
  @@ -84,7 +84,7 @@
                       }
                       return null;
                   }
  -                
  +
               },
               FormatterElement.TypeAttribute.class
               );
  @@ -94,7 +94,7 @@
       /**
        * A helper method which will attempt to find a project in the current context
        * or install one if need be.
  -     * 
  +     *
        * #### this method could move to an AntUtils class.
        */
       public static Project getProject(JellyContext context) {
  @@ -108,7 +108,7 @@
   
       /**
        * Sets the Ant Project to be used for this JellyContext.
  -     * 
  +     *
        * #### this method could move to an AntUtils class.
        */
       public static void setProject(JellyContext context, Project project) {
  @@ -117,9 +117,9 @@
   
       /**
        * A helper method to create a new project
  -     * 
  +     *
        * #### this method could move to an AntUtils class.
  -     */    
  +     */
       public static Project createProject(JellyContext context) {
           GrantProject project = new GrantProject();
           project.setPropsHandler(new JellyPropsHandler(context));
  @@ -131,11 +131,11 @@
           logger.setErrorPrintStream( System.err);
   
           project.addBuildListener( logger );
  -        
  +
           project.init();
           project.getBaseDir();
           if (context.getCurrentURL() != null) {
  -            project.setProperty("ant.file", 
  +            project.setProperty("ant.file",
                       context.getCurrentURL().toExternalForm());
           }
   
  @@ -158,28 +158,28 @@
           return answer;
       }
   
  -    /** 
  +    /**
        * @return a new TagScript for any custom, statically defined tags, like 
'fileScanner'
        */
       public TagScript createCustomTagScript(String name, Attributes attributes) 
throws JellyException {
           // custom Ant tags
  -        if ( name.equals("fileScanner") ) {      
  +        if ( name.equals("fileScanner") ) {
               return new TagScript(
                   new TagFactory() {
                       public Tag createTag(String name, Attributes attributes) throws 
JellyException {
                           return new FileScannerTag(new FileScanner());
                       }
                   }
  -            );      
  +            );
           }
  -        if ( name.equals("setProperty") ) {      
  +        if ( name.equals("setProperty") ) {
               return new TagScript(
                   new TagFactory() {
                       public Tag createTag(String name, Attributes attributes) throws 
JellyException {
                           return new SetPropertyTag();
                       }
                   }
  -            );      
  +            );
           }
           return null;
       }
  
  
  
  1.10      +6 -6      
jakarta-commons/jelly/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant/TaskSource.java
  
  Index: TaskSource.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/jelly/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant/TaskSource.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TaskSource.java   25 Feb 2004 01:23:59 -0000      1.9
  +++ TaskSource.java   9 Sep 2004 12:05:48 -0000       1.10
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -17,7 +17,7 @@
   
   import org.apache.commons.jelly.JellyTagException;
   
  -/** 
  +/**
    * A tag which provides an Ant Task object on which to set Ant DataTypes or create 
nested types
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">James Strachan</a>
  @@ -25,11 +25,11 @@
    */
   public interface TaskSource {
   
  -    /** 
  +    /**
        * @return the Ant object which may be an Ant Task or nested element
        */
       public Object getTaskObject() throws JellyTagException;
  -    
  +
       /**
        * Allows nested tags to set a property on the task object of this tag
        */
  
  
  
  1.6       +4 -4      
jakarta-commons/jelly/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant/SetPropertyTag.java
  
  Index: SetPropertyTag.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/jelly/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant/SetPropertyTag.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SetPropertyTag.java       25 Feb 2004 01:23:59 -0000      1.5
  +++ SetPropertyTag.java       9 Sep 2004 12:05:48 -0000       1.6
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -39,7 +39,7 @@
       private String name;
       private Object value;
       private Object defaultValue;
  -    
  +
       public SetPropertyTag() {
       }
   
  
  
  
  1.7       +18 -18    
jakarta-commons/jelly/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant/FileIterator.java
  
  Index: FileIterator.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/jelly/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant/FileIterator.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- FileIterator.java 25 Feb 2004 01:23:59 -0000      1.6
  +++ FileIterator.java 9 Sep 2004 12:05:48 -0000       1.7
  @@ -1,12 +1,12 @@
   /*
    * Copyright 2002,2004 The Apache Software Foundation.
  - * 
  + *
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
  - * 
  + *
    *      http://www.apache.org/licenses/LICENSE-2.0
  - * 
  + *
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  @@ -23,8 +23,8 @@
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.types.FileSet;
   
  -/** 
  - * <p><code>FileIterator</code> is an iterator over a 
  +/**
  + * <p><code>FileIterator</code> is an iterator over a
    * over a number of files from a colleciton of FileSet instances.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">James Strachan</a>
  @@ -34,19 +34,19 @@
   
       /** The iterator over the FileSet objects */
       private Iterator fileSetIterator;
  -    
  +
       /** The Ant project */
       private Project project;
  -    
  +
       /** The directory scanner */
       private DirectoryScanner ds;
  -    
  +
       /** The file names in the current FileSet scan */
       private String[] files;
  -    
  +
       /** The current index into the file name array */
       private int fileIndex = -1;
  -    
  +
       /** The next File object we'll iterate over */
       private File nextFile;
   
  @@ -68,15 +68,15 @@
           this.fileSetIterator = fileSetIterator;
           this.iterateDirectories = iterateDirectories;
       }
  -    
  +
       // Iterator interface
       //-------------------------------------------------------------------------
  -    
  +
       /** @return true if there is another object that matches the given predicate */
       public boolean hasNext() {
           if ( nextObjectSet ) {
               return true;
  -        } 
  +        }
           else {
               return setNextObject();
           }
  @@ -92,9 +92,9 @@
           nextObjectSet = false;
           return nextFile;
       }
  -    
  +
       /**
  -     * throws UnsupportedOperationException 
  +     * throws UnsupportedOperationException
        */
       public void remove() {
           throw new UnsupportedOperationException();
  @@ -104,7 +104,7 @@
       //-------------------------------------------------------------------------
   
       /**
  -     * Set nextObject to the next object. If there are no more 
  +     * Set nextObject to the next object. If there are no more
        * objects then return false. Otherwise, return true.
        */
       private boolean setNextObject() {
  @@ -118,7 +118,7 @@
                   ds.scan();
                   if (iterateDirectories) {
                       files = ds.getIncludedDirectories();
  -                } 
  +                }
                   else {
                       files = ds.getIncludedFiles();
                   }
  @@ -130,7 +130,7 @@
                       ds = null;
                   }
               }
  -        
  +
               if ( ds != null && files != null ) {
                   if ( ++fileIndex < files.length ) {
                       nextFile = new File( ds.getBasedir(), files[fileIndex] );
  
  
  

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

Reply via email to