jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1199895 - in /jmeter/trunk: src/core/org/apache/jmeter/gui/util/MenuFactory.java src/core/org/apache/jmeter/testbeans/gui/TestBeanGUI.java xdocs/changes.xml
Date Wed, 09 Nov 2011 18:03:16 GMT
Author: sebb
Date: Wed Nov  9 18:03:15 2011
New Revision: 1199895

URL: http://svn.apache.org/viewvc?rev=1199895&view=rev
Log:
Bug 52160 - Don't display TestBeanGui items which are flagged as hidden

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java
    jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TestBeanGUI.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java?rev=1199895&r1=1199894&r2=1199895&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java Wed Nov  9 18:03:15
2011
@@ -436,11 +436,15 @@ public final class MenuFactory {
                     continue;
                 }
 
+                boolean hideBean = false; // Should the TestBean be hidden?
+
                 JMeterGUIComponent item;
                 try {
                     Class<?> c = Class.forName(name);
                     if (TestBean.class.isAssignableFrom(c)) {
-                        item = new TestBeanGUI(c);
+                        TestBeanGUI tbgui = new TestBeanGUI(c);
+                        hideBean = tbgui.isHidden() || (tbgui.isExpert() && !JMeterUtils.isExpertMode());
+                        item = tbgui;
                     } else {
                         item = (JMeterGUIComponent) c.newInstance();
                     }
@@ -457,7 +461,7 @@ public final class MenuFactory {
                     }
                     continue;
                 }
-                if (elementsToSkip.contains(item.getStaticLabel())) {
+                if (hideBean || elementsToSkip.contains(item.getStaticLabel())) {
                     log.info("Skipping " + name);
                     continue;
                 } else {

Modified: jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TestBeanGUI.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TestBeanGUI.java?rev=1199895&r1=1199894&r2=1199895&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TestBeanGUI.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TestBeanGUI.java Wed Nov  9 18:03:15
2011
@@ -435,4 +435,12 @@ public class TestBeanGUI extends Abstrac
             gtbc.clearGuiFields();
         }
     }
+
+    public boolean isHidden() {
+        return beanInfo.getBeanDescriptor().isHidden();
+    }
+
+    public boolean isExpert() {
+        return beanInfo.getBeanDescriptor().isExpert();
+    }
 }

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1199895&r1=1199894&r2=1199895&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Wed Nov  9 18:03:15 2011
@@ -206,6 +206,7 @@ these occurs, Sampler is marked as faile
 <li>Bug 52099 - Allow to set the transaction isolation in the JDBC Connection Configuration</li>
 <li>Bug 52116 - Allow to add (paste) entries from the clipboard to an arguments list</li>
 <li>Bug 51091 - New function returning the name of the current "Test Plan"</li>
+<li>Bug 52160 - Don't display TestBeanGui items which are flagged as hidden</li>
 </ul>
 
 <h2>Non-functional changes</h2>



Mime
View raw message