ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject cvs commit: jakarta-ant/proposal/xdocs/src/org/apache/tools/ant/xdoclet TaskTagsHandler.java
Date Wed, 19 Jun 2002 20:17:15 GMT
ehatcher    2002/06/19 13:17:15

  Modified:    proposal/xdocs/src/org/apache/tools/ant/xdoclet Tag:
                        ANT_15_BRANCH TaskTagsHandler.java
  Log:
  unfortunately we have public setters that are not designed to be set from a build file,
so adding @ant.attrinbute ignore="true" and @ant.element ignore="true" to allow them to be
skipped.  *sigh*
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.6   +23 -1     jakarta-ant/proposal/xdocs/src/org/apache/tools/ant/xdoclet/TaskTagsHandler.java
  
  Index: TaskTagsHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/xdocs/src/org/apache/tools/ant/xdoclet/TaskTagsHandler.java,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- TaskTagsHandler.java	19 Jun 2002 04:34:57 -0000	1.1.2.5
  +++ TaskTagsHandler.java	19 Jun 2002 20:17:14 -0000	1.1.2.6
  @@ -486,6 +486,9 @@
                   if (isDeprecated(method)) {
                     continue;
                   }
  +                if (shouldIgnore(method)) {
  +                    continue;
  +                }
                   String methodName = method.name();
                   if (method.containingClass() == cur_class) {
                       if (already.containsKey(methodName) == false) {
  @@ -504,10 +507,29 @@
       private boolean isDeprecated (MethodDoc method) {
           Tag[] tags = method.tags();
           for (int i=0; i < tags.length; i++) {
  -            System.out.println("tag = " + tags[i].name());
               if (tags[i].name().equals("@deprecated")) {
                   return true;
               }
  +        }
  +        return false;
  +    }
  +
  +    /**
  +     * For now, lump attributes and elements together since we won't
  +     * have those tags on the same method.
  +     */
  +    private boolean shouldIgnore (MethodDoc method) throws XDocletException {
  +        String value = getTagValue(method, "ant:attribute", "ignore", -1,
  +                null, null, null, null,
  +                null, false, XDocletTagSupport.FOR_METHOD, false);
  +        if ("true".equals(value)) {
  +            return true;
  +        }
  +        value = getTagValue(method, "ant:element", "ignore", -1,
  +                null, null, null, null,
  +                null, false, XDocletTagSupport.FOR_METHOD, false);
  +        if ("true".equals(value)) {
  +            return true;
           }
           return false;
       }
  
  
  

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