jsalvata    2004/01/05 08:58:38

  Modified:    src/core/org/apache/jmeter/testbeans/gui Tag:
                        testbeans_experimental_branch WrapperEditor.java
  Log:
  Provide a mechanism to add options to the drop-down box
  without having to create a full-fledged PropertyEditor.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.6   +10 -2     
jakarta-jmeter/src/core/org/apache/jmeter/testbeans/gui/Attic/WrapperEditor.java
  
  Index: WrapperEditor.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/testbeans/gui/Attic/WrapperEditor.java,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- WrapperEditor.java        4 Jan 2004 20:48:45 -0000       1.1.2.5
  +++ WrapperEditor.java        5 Jan 2004 16:58:38 -0000       1.1.2.6
  @@ -95,7 +95,7 @@
    * <ul>
    * <li>An option for "undefined" (corresponding to the null value or NullProperty).
    * <li>An option for each value returned by the getTags() method on the wrapped
  - *   editor.
  + *   editor or from the "tags" attribute of the property descriptor.
    * <li>The possibility to write your own value, which will be parsed by the
    *           wrapped editor to convert into the edited type unless (and this is an
    *           heuristic) it contains the string "${", in which case it will be
  @@ -199,6 +199,14 @@
               if (tags != null)
               {
                   options.addAll(Arrays.asList(tags));
  +            }
  +            
  +            // Add the list of values given by the property descriptor,
  +            // if there is one:
  +            tags= (String[])descriptor.getValue("tags");
  +            if (tags != null)
  +            {
  +             options.addAll(Arrays.asList(tags));
               }
   
               // Create the combo box we will use to edit this property:
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to