Author: sebb
Date: Wed Sep 28 11:49:19 2011
New Revision: 1176834

URL: http://svn.apache.org/viewvc?rev=1176834&view=rev
Log:
Allow direct access to argument pane contents, without configuring the test 
element

Modified:
    
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java

Modified: 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java?rev=1176834&r1=1176833&r2=1176834&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java
 Wed Sep 28 11:49:19 2011
@@ -89,6 +89,22 @@ public class HTTPArgumentsPanel extends 
 
     @Override
     public TestElement createTestElement() {
+        Arguments args = getUnclonedParameters();
+        this.configureTestElement(args);
+        return (TestElement) args.clone();
+    }
+
+    /**
+     * Convert the argument panel contents to an {@link Arguments} collection.
+     * 
+     * @return a collection of {@link HTTPArgument} entries
+     */
+    public Arguments getParameters() {
+        Arguments args = getUnclonedParameters();
+        return (Arguments) args.clone();
+    }
+
+    private Arguments getUnclonedParameters() {
         stopTableEditing();
         @SuppressWarnings("unchecked") // only contains Argument (or 
HTTPArgument)
         Iterator<HTTPArgument> modelData = (Iterator<HTTPArgument>) 
tableModel.iterator();
@@ -97,8 +113,7 @@ public class HTTPArgumentsPanel extends 
             HTTPArgument arg = modelData.next();
             args.addArgument(arg);
         }
-        this.configureTestElement(args);
-        return (TestElement) args.clone();
+        return args;
     }
 
     @Override



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to