jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1408979 - in /jmeter/trunk: src/components/org/apache/jmeter/control/gui/ModuleControllerGui.java xdocs/changes.xml
Date Tue, 13 Nov 2012 21:55:04 GMT
Author: pmouawad
Date: Tue Nov 13 21:55:03 2012
New Revision: 1408979

URL: http://svn.apache.org/viewvc?rev=1408979&view=rev
Log:
Bug 54132 - Module Controller GUI : Improve rendering of referenced controller
Bugzilla Id: 54132

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/control/gui/ModuleControllerGui.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/components/org/apache/jmeter/control/gui/ModuleControllerGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/control/gui/ModuleControllerGui.java?rev=1408979&r1=1408978&r2=1408979&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/control/gui/ModuleControllerGui.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/control/gui/ModuleControllerGui.java Tue
Nov 13 21:55:03 2012
@@ -50,6 +50,28 @@ public class ModuleControllerGui extends
 // implements UnsharedComponent
 {
 
+    private static final 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;
+        }
+    
+    }
     private static final long serialVersionUID = 240L;
 
     private JMeterTreeNode selected = null;
@@ -198,7 +220,7 @@ public class ModuleControllerGui extends
         if (level == 0 && (parent_name == null || parent_name.length() == 0)) {
             nodesModel.addElement(new TreeNodeWrapper(null, "")); // $NON-NLS-1$
         }
-        String seperator = " > "; // $NON-NLS-1$
+        String separator = " > "; // $NON-NLS-1$
         if (node != null) {
             StringBuilder name = new StringBuilder();
             for (int i = 0; i < node.getChildCount(); i++) {
@@ -208,56 +230,21 @@ public class ModuleControllerGui extends
                 if (te instanceof AbstractThreadGroup) {
                     name.append(parent_name);
                     name.append(cur.getName());
-                    name.append(seperator);
+                    name.append(separator);
                     buildNodesModel(cur, name.toString(), level);
                 } else if (te instanceof Controller && !(te instanceof ModuleController))
{
-                    name.append(spaces(level));
                     name.append(parent_name);
                     name.append(cur.getName());
                     TreeNodeWrapper tnw = new TreeNodeWrapper(cur, name.toString());
                     nodesModel.addElement(tnw);
-                    name.setLength(0);
-                    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);
                 }
             }
         }
     }
-
-    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=1408979&r1=1408978&r2=1408979&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Tue Nov 13 21:55:03 2012
@@ -156,6 +156,7 @@ and right angle bracket (&gt;) in search
 <h3>Controllers</h3>
 <ul>
 <li><bugzilla>54131</bugzilla> - ForEach Controller : Add start and end
index for looping over variables</li>
+<li><bugzilla>54132</bugzilla> - Module Controller GUI : Improve rendering
of referenced controller</li>
 </ul>
 
 <h3>Listeners</h3>



Mime
View raw message