ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From umag...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs AntStructure.java
Date Sat, 02 Feb 2002 02:42:44 GMT
umagesh     02/02/01 18:42:44

  Modified:    src/main/org/apache/tools/ant/taskdefs AntStructure.java
  Log:
  Name is optional for <project>
  
  PR: 5028
  
  Submitted by: jesse.glick@netbeans.com (Jesse Glick)
  
  Revision  Changes    Path
  1.19      +17 -17    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/AntStructure.java
  
  Index: AntStructure.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/AntStructure.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- AntStructure.java	26 Jan 2002 19:40:12 -0000	1.18
  +++ AntStructure.java	2 Feb 2002 02:42:44 -0000	1.19
  @@ -77,7 +77,7 @@
    *
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    *
  - * @version $Revision: 1.18 $
  + * @version $Revision: 1.19 $
    */
   
   public class AntStructure extends Task {
  @@ -104,7 +104,7 @@
           if (output == null) {
               throw new BuildException("output attribute is required", location);
           }
  -        
  +
           PrintWriter out = null;
           try {
               try {
  @@ -118,8 +118,8 @@
                    */
                   out = new PrintWriter(new FileWriter(output));
               }
  -            
  -            printHead(out, project.getTaskDefinitions().keys(), 
  +
  +            printHead(out, project.getTaskDefinitions().keys(),
                         project.getDataTypeDefinitions().keys());
   
               printTargetDecl(out);
  @@ -127,14 +127,14 @@
               Enumeration dataTypes = project.getDataTypeDefinitions().keys();
               while (dataTypes.hasMoreElements()) {
                   String typeName = (String) dataTypes.nextElement();
  -                printElementDecl(out, typeName, 
  +                printElementDecl(out, typeName,
                                    (Class) project.getDataTypeDefinitions().get(typeName));
               }
  -            
  +
               Enumeration tasks = project.getTaskDefinitions().keys();
               while (tasks.hasMoreElements()) {
                   String taskName = (String) tasks.nextElement();
  -                printElementDecl(out, taskName, 
  +                printElementDecl(out, taskName,
                                    (Class) project.getTaskDefinitions().get(taskName));
               }
   
  @@ -150,7 +150,7 @@
           }
       }
   
  -    private void printHead(PrintWriter out, Enumeration tasks, 
  +    private void printHead(PrintWriter out, Enumeration tasks,
                              Enumeration types) {
           out.println("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>");
           out.println("<!ENTITY % boolean \"(true|false|on|off|yes|no)\">");
  @@ -180,12 +180,12 @@
           out.println("\">");
   
           out.println("");
  -        
  +
           out.print("<!ELEMENT project (target | property | taskdef | ");
           out.print(TYPES);
           out.println(")*>");
           out.println("<!ATTLIST project");
  -        out.println("          name    CDATA #REQUIRED");
  +        out.println("          name    CDATA #IMPLIED");
           out.println("          default CDATA #REQUIRED");
           out.println("          basedir CDATA #IMPLIED>");
           out.println("");
  @@ -209,7 +209,7 @@
           out.println("");
       }
   
  -    private void printElementDecl(PrintWriter out, String name, Class element) 
  +    private void printElementDecl(PrintWriter out, String name, Class element)
           throws BuildException {
   
           if (visited.containsKey(name)) {
  @@ -278,24 +278,24 @@
           sb.setLength(0);
           sb.append("<!ATTLIST ").append(name);
           sb.append(lSep).append("          id ID #IMPLIED");
  -        
  +
           enum = ih.getAttributes();
           while (enum.hasMoreElements()) {
               String attrName = (String) enum.nextElement();
               if ("id".equals(attrName)) {
                 continue;
               }
  -            
  +
               sb.append(lSep).append("          ").append(attrName).append(" ");
               Class type = ih.getAttributeType(attrName);
  -            if (type.equals(java.lang.Boolean.class) || 
  +            if (type.equals(java.lang.Boolean.class) ||
                   type.equals(java.lang.Boolean.TYPE)) {
                   sb.append(BOOLEAN).append(" ");
  -            } else if (org.apache.tools.ant.types.Reference.class.isAssignableFrom(type))
{ 
  +            } else if (org.apache.tools.ant.types.Reference.class.isAssignableFrom(type))
{
                   sb.append("IDREF ");
               } else if (org.apache.tools.ant.types.EnumeratedAttribute.class.isAssignableFrom(type))
{
                   try {
  -                    EnumeratedAttribute ea = 
  +                    EnumeratedAttribute ea =
                           (EnumeratedAttribute)type.newInstance();
                       String[] values = ea.getValues();
                       if (values == null
  @@ -336,7 +336,7 @@
               }
           }
       }
  -    
  +
       private void printTail(PrintWriter out) {}
   
       /**
  
  
  

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