jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1411013 - in /jmeter/trunk: src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java xdocs/changes.xml
Date Sun, 18 Nov 2012 22:52:56 GMT
Author: pmouawad
Date: Sun Nov 18 22:52:55 2012
New Revision: 1411013

URL: http://svn.apache.org/viewvc?rev=1411013&view=rev
Log:
Bug 54165 - Proxy Server: Improve rendering of target controller

Bugzilla Id: 54165

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java?rev=1411013&r1=1411012&r2=1411013&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
Sun Nov 18 22:52:55 2012
@@ -50,6 +50,7 @@ import javax.swing.JTextField;
 
 import org.apache.jmeter.control.Controller;
 import org.apache.jmeter.control.gui.LogicControllerGui;
+import org.apache.jmeter.control.gui.TreeNodeWrapper;
 import org.apache.jmeter.engine.util.ValueReplacer;
 import org.apache.jmeter.functions.InvalidVariableException;
 import org.apache.jmeter.gui.GuiPackage;
@@ -825,7 +826,7 @@ public class ProxyControlGui extends Log
     }
 
     private void buildNodesModel(JMeterTreeNode node, String parent_name, int level) {
-        String seperator = " > ";
+        String separator = " > ";
         if (node != null) {
             for (int i = 0; i < node.getChildCount(); i++) {
                 StringBuilder name = new StringBuilder();
@@ -841,53 +842,19 @@ public class ProxyControlGui extends Log
                  * buildNodesModel(cur, name.toString(), level); } else
                  */
                 if (te instanceof Controller) {
-                    name.append(spaces(level));
                     name.append(parent_name);
                     name.append(cur.getName());
                     TreeNodeWrapper tnw = new TreeNodeWrapper(cur, name.toString());
                     targetNodesModel.addElement(tnw);
-                    name = new StringBuilder();
-                    name.append(cur.getName());
-                    name.append(seperator);
+                    name.append(separator);
                     buildNodesModel(cur, name.toString(), level + 1);
                 } else if (te instanceof TestPlan || te instanceof WorkBench) {
                     name.append(cur.getName());
-                    name.append(seperator);
+                    name.append(separator);
                     buildNodesModel(cur, name.toString(), 0);
                 }
                 // Ignore everything else
             }
         }
     }
-
-    private String spaces(int level) {
-        int multi = 4;
-        StringBuilder spaces = new StringBuilder(level * multi);
-        for (int i = 0; i < level * multi; i++) {
-            spaces.append(" "); // $NON-NLS-1$
-        }
-        return spaces.toString();
-    }
-
-}
-
-class TreeNodeWrapper {
-    private final JMeterTreeNode tn;
-
-    private final String label;
-
-    public TreeNodeWrapper(JMeterTreeNode tn, String label) {
-        this.tn = tn;
-        this.label = label;
-    }
-
-    public JMeterTreeNode getTreeNode() {
-        return tn;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String toString() {
-        return label;
-    }
-}
+}
\ No newline at end of file

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1411013&r1=1411012&r2=1411013&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Sun Nov 18 22:52:55 2012
@@ -197,6 +197,7 @@ and right angle bracket (&gt;) in search
 <li>Webservice (SOAP) Request has been deprecated</li>
 <li><bugzilla>54161</bugzilla> - Proxy : be able to create binary sampler
for x-www-form-urlencoded POST request</li>
 <li><bugzilla>54154</bugzilla> - HTTP Proxy Server should not force user
to select the type of Sampler in HTTP Sampler Settings</li>
+<li><bugzilla>54165</bugzilla> - Proxy Server: Improve rendering of target
controller</li>
 </ul>
 
 <h2>Non-functional changes</h2>



Mime
View raw message