User: ko5tik  
  Date: 02/04/15 10:33:21

  Modified:    src/java/xtags Tag.java TagParameter.java
  Log:
  parameter addition to described tags works & rocks
  
  Revision  Changes    Path
  1.5       +12 -0     xdocletgui/src/java/xtags/Tag.java
  
  Index: Tag.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdocletgui/src/java/xtags/Tag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -r1.4 -r1.5
  --- Tag.java  6 Apr 2002 14:39:29 -0000       1.4
  +++ Tag.java  15 Apr 2002 17:33:20 -0000      1.5
  @@ -38,6 +38,7 @@
   import java.util.List;
   import java.util.ArrayList;
   import java.util.Collections;
  +import java.util.Collection;
   import java.util.TreeMap;
   import xjavadoc.XProgramElement;
   import xtags.condition.Or;
  @@ -157,6 +158,16 @@
   
   
        /**
  +      * get list of parameters. sorted. alphabetically
  +      *
  +      * @return The Parameters value
  +      */
  +     public Collection getParameters() {
  +             return _parameterMap.keySet();
  +     }
  +
  +
  +     /**
         * return whether tag has given parameter defined
         *
         * @param parameterName Describe what the parameter does
  @@ -235,6 +246,7 @@
                                );
                _tagParameters.add(tagParameter);
                _or.addCondition(condition);
  +             _parameterMap.put(tagParameter.getName(), tagParameter);
                return tagParameter;
        }
   }
  
  
  
  1.5       +16 -1     xdocletgui/src/java/xtags/TagParameter.java
  
  Index: TagParameter.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdocletgui/src/java/xtags/TagParameter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -r1.4 -r1.5
  --- TagParameter.java 14 Apr 2002 14:27:40 -0000      1.4
  +++ TagParameter.java 15 Apr 2002 17:33:21 -0000      1.5
  @@ -85,7 +85,7 @@
        private final Class _valueClass;
   
        /**
  -      * @todo-javadoc Describe the field
  +      * applicability condition to xprogram element
         */
        private Condition _condition;
   
  @@ -203,6 +203,21 @@
                else {
                        return null;
                }
  +     }
  +
  +
  +     /**
  +      * decide whether parametr is applicable for program element
  +      *
  +      * @param programElement Describe what the parameter does
  +      * @return The Applicable value
  +      * @todo-javadoc Write javadocs for method parameter
  +      */
  +     public boolean isApplicable(XProgramElement programElement) {
  +             if (_condition == null) {
  +                     return true;
  +             }
  +             return _condition.eval(programElement);
        }
   
   
  
  
  

_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to