User: ko5tik  
  Date: 02/04/05 09:46:47

  Modified:    src/java/xdocletgui/swing TreeFactoryScratch.java
  Added:       src/java/xdocletgui/swing TagParameterTreeNode.java
  Log:
  created tag parameter node. dummy thing for now
  more functionality and xtag parameter awarness planned for tomorrow
  after 16:00 MET
  
  Revision  Changes    Path
  1.7       +23 -2     xdocletgui/src/java/xdocletgui/swing/TreeFactoryScratch.java
  
  Index: TreeFactoryScratch.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdocletgui/src/java/xdocletgui/swing/TreeFactoryScratch.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -w -r1.6 -r1.7
  --- TreeFactoryScratch.java   5 Apr 2002 16:50:32 -0000       1.6
  +++ TreeFactoryScratch.java   5 Apr 2002 17:46:47 -0000       1.7
  @@ -93,6 +93,28 @@
   
   
        /**
  +      * Describe what the method does
  +      *
  +      * @param tag Describe what the parameter does
  +      * @param xtag Describe what the parameter does
  +      * @return Describe the return value
  +      * @todo-javadoc Write javadocs for method
  +      * @todo-javadoc Write javadocs for method parameter
  +      * @todo-javadoc Write javadocs for method parameter
  +      * @todo-javadoc Write javadocs for return value
  +      */
  +     static TagTreeNode createParsedTagNode(Tag tag, XTag xtag) {
  +             TagTreeNode tagTreeNode = new TagTreeNode(tag, xtag);
  +
  +             String[] attributes = xtag.attributeValueNames();
  +             for (int i = 0; i < attributes.length; i++) {
  +                     tagTreeNode.add(new TagParameterTreeNode(attributes[i], 
xtag.attributeValue(attributes[i])));
  +             }
  +             return tagTreeNode;
  +     }
  +
  +
  +     /**
         * create tag nodes for given program element. Tags have to belong to given
         * family
         *
  @@ -137,7 +159,7 @@
                                }
                        }
                        if (tf != null) {
  -                             
((TagFamilyTreeNode)familyMap.get(tf.getName())).add(new 
TagTreeNode(tf.getTag(xtags[t].name()), xtags[t]));
  +                             
((TagFamilyTreeNode)familyMap.get(tf.getName())).add(createParsedTagNode(tf.getTag(xtags[t].name()),
 xtags[t]));
                        }
                        else {
                                unknownTags.add(new UnknownTagTreeNode(xtags[t]));
  @@ -191,5 +213,4 @@
                        }
                }
        }
  -
   }
  
  
  
  1.1                  xdocletgui/src/java/xdocletgui/swing/TagParameterTreeNode.java
  
  Index: TagParameterTreeNode.java
  ===================================================================
  /*
   * Copyright (c) 2001, Aslak Hellesøy, BEKK Consulting
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without modification,
   * are permitted provided that the following conditions are met:
   *
   * - Redistributions of source code must retain the above copyright notice,
   *   this list of conditions and the following disclaimer.
   *
   * - Redistributions in binary form must reproduce the above copyright
   *   notice, this list of conditions and the following disclaimer in the
   *   documentation and/or other materials provided with the distribution.
   *
   * - Neither the name of BEKK Consulting nor the names of its
   *   contributors may be used to endorse or promote products derived from
   *   this software without specific prior written permission.
   *
   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
   * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
   * DAMAGE.
   */
  
  /*
   * Change log
   *
   */
  package xdocletgui.swing;
  import javax.swing.tree.DefaultMutableTreeNode;
  
  /**
   * Describe what this class does
   *
   * @author kostik
   * @created April 5, 2002
   * @todo-javadoc Write javadocs
   */
  public class TagParameterTreeNode extends DefaultMutableTreeNode {
  
        /**
         * @todo-javadoc Describe the field
         */
        String _attributeName;
  
        /**
         * @todo-javadoc Describe the field
         */
        String _attributeValue;
  
  
        /**
         * Describe what the TagParameterTreeNode constructor does
         *
         * @param attributeName Describe what the parameter does
         * @param attributeValue Describe what the parameter does
         * @todo-javadoc Write javadocs for constructor
         * @todo-javadoc Write javadocs for method parameter
         * @todo-javadoc Write javadocs for method parameter
         */
        public TagParameterTreeNode(String attributeName, String attributeValue) {
                super();
                _attributeName = attributeName;
                _attributeValue = attributeValue;
        }
  
  
        /**
         * Gets the AtributeName attribute of the TagParameterTreeNode object
         *
         * @return The AtributeName value
         */
        public String getAtributeName() {
                return _attributeName;
        }
  
  
        /**
         * Gets the AttributeValue attribute of the TagParameterTreeNode object
         *
         * @return The AttributeValue value
         */
        public String getAttributeValue() {
                return _attributeValue;
        }
  
  
        /**
         * Describe what the method does
         *
         * @return Describe the return value
         * @todo-javadoc Write javadocs for method
         * @todo-javadoc Write javadocs for return value
         */
        public String toString() {
                return _attributeName;
        }
  
  }
  
  
  

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

Reply via email to