ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/proposal/mutant/src/java/common/org/apache/ant/common/model BuildElement.java
Date Tue, 30 Apr 2002 07:00:51 GMT
conor       02/04/30 00:00:51

  Modified:    proposal/mutant/build ant1compat.xml
               proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant
                        Project.java
               proposal/mutant/src/java/common/org/apache/ant/common/model
                        BuildElement.java
  Log:
  Bring across more Ant1 tasks (ant structure)
  
  Revision  Changes    Path
  1.17      +15 -16    jakarta-ant/proposal/mutant/build/ant1compat.xml
  
  Index: ant1compat.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/build/ant1compat.xml,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -w -u -r1.16 -r1.17
  --- ant1compat.xml	29 Apr 2002 23:47:27 -0000	1.16
  +++ ant1compat.xml	30 Apr 2002 07:00:51 -0000	1.17
  @@ -28,11 +28,7 @@
     </patternset>
     
     <patternset id="toohard">
  -    <exclude name="org/apache/tools/ant/taskdefs/AntStructure.java"/>
  -    <exclude name="org/apache/tools/ant/taskdefs/Recorder.java"/>
  -    <exclude name="org/apache/tools/ant/taskdefs/RecorderEntry.java"/>
       <exclude name="org/apache/tools/ant/taskdefs/Do.java"/>
  -    <exclude name="org/apache/tools/ant/taskdefs/optional/jdepend/*.java"/>
     </patternset>
     
     <patternset id="converted">
  @@ -40,6 +36,19 @@
       <exclude name="org/apache/tools/ant/taskdefs/CallTarget.java"/>
       <exclude name="org/apache/tools/ant/taskdefs/input/InputRequest.java"/>
       <exclude name="org/apache/tools/ant/types/DataType.java"/>
  +    <exclude name="org/apache/tools/ant/Project.java"/>
  +    <exclude name="org/apache/tools/ant/Target.java"/>
  +    <exclude name="org/apache/tools/ant/TaskContainer.java"/>
  +    <exclude name="org/apache/tools/ant/ProjectComponent.java"/>
  +    <exclude name="org/apache/tools/ant/ProjectHelper.java"/>
  +    <exclude name="org/apache/tools/ant/Task.java"/>
  +    <exclude name="org/apache/tools/ant/Main.java"/>
  +  </patternset>
  +
  +  <patternset id="notrequired">
  +    <exclude name="org/apache/tools/ant/DemuxOutputStream.java"/>
  +    <exclude name="org/apache/tools/ant/RuntimeConfigurable.java"/>
  +    <exclude name="org/apache/tools/ant/UnknownElement.java"/>
     </patternset>
   
     <fileset id="ant1src_tocopy" dir="${ant1java.dir}">
  @@ -53,21 +62,11 @@
       <include name="org/apache/tools/bzip2/**/*.java"/>
       <include name="org/apache/tools/mail/**/*.java"/>
       <include name="org/apache/tools/tar/**/*.java"/>
  -    <include name="org/apache/tools/ant/BuildException.java"/>
  -    <include name="org/apache/tools/ant/ExitException.java"/>
  -    <include name="org/apache/tools/ant/DirectoryScanner.java"/>
  -    <include name="org/apache/tools/ant/PathTokenizer.java"/>
  -    <include name="org/apache/tools/ant/FileScanner.java"/>
  -    <include name="org/apache/tools/ant/TaskAdapter.java"/>
  -    <include name="org/apache/tools/ant/MatchingTask.java"/>
  -    <include name="org/apache/tools/ant/Location.java"/>
  -    <include name="org/apache/tools/ant/AntClassLoader.java"/>
  -    <include name="org/apache/tools/ant/BuildEvent.java"/>
  -    <include name="org/apache/tools/ant/BuildListener.java"/>
  -    <include name="org/apache/tools/ant/BuildLogger.java"/>
  +    <include name="org/apache/tools/ant/*.java"/>
       <!-- <patternset refid="deprecated"/> -->
       <patternset refid="toohard"/>
       <patternset refid="converted"/>
  +    <patternset refid="notrequired"/>
     </fileset>
   
     <path id="classpath">
  
  
  
  1.22      +39 -0     jakarta-ant/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/antlibs/ant1compat/org/apache/tools/ant/Project.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -w -u -r1.21 -r1.22
  --- Project.java	29 Apr 2002 15:29:12 -0000	1.21
  +++ Project.java	30 Apr 2002 07:00:51 -0000	1.22
  @@ -341,6 +341,45 @@
       }
   
       /**
  +     * Returns a description of the type of the given element, with
  +     * special handling for instances of tasks and data types.
  +     * <p>
  +     * This is useful for logging purposes.
  +     * 
  +     * @param element The element to describe.
  +     *                Must not be <code>null</code>.
  +     * 
  +     * @return a description of the element type
  +     *
  +     * @since 1.95, Ant 1.5
  +     */
  +    public String getElementName(Object element) {
  +        Hashtable elements = taskClassDefinitions;
  +        Class elementClass = element.getClass();
  +        String typeName = "task";
  +        if (!elements.contains(elementClass)) {
  +            elements = dataClassDefinitions;
  +            typeName = "data type";
  +            if (!elements.contains(elementClass)) {
  +                elements = null;
  +            }
  +        }
  +
  +        if (elements != null) {
  +            Enumeration e = elements.keys();
  +            while (e.hasMoreElements()) {
  +                String name = (String) e.nextElement();
  +                Class clazz = (Class) elements.get(name);
  +                if (elementClass.equals(clazz)) {
  +                    return "The <" + name + "> " + typeName;
  +                }
  +            }
  +        }
  +
  +        return "Class " + elementClass.getName();
  +    }
  +
  +    /**
        * Gets the Antlib factory of the Project
        *
        * @return The project's associated factory object
  
  
  
  1.4       +1 -1      jakarta-ant/proposal/mutant/src/java/common/org/apache/ant/common/model/BuildElement.java
  
  Index: BuildElement.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/mutant/src/java/common/org/apache/ant/common/model/BuildElement.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -u -r1.3 -r1.4
  --- BuildElement.java	7 Apr 2002 14:38:07 -0000	1.3
  +++ BuildElement.java	30 Apr 2002 07:00:51 -0000	1.4
  @@ -61,7 +61,7 @@
   import org.apache.ant.common.util.Location;
   
   /**
  - * A BuildElement is a holder configuration information for an element of
  + * A BuildElement is a holder of configuration information for an element of
    * the build. BuildElements may be grouped into a hierarchy to capture any
    * level of element nesting.
    *
  
  
  

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