sebb 2005/03/20 13:59:16 Modified: src/core/org/apache/jmeter/testelement AbstractTestElement.java TestElement.java Log: Add isEnabled() method Revision Changes Path 1.43 +9 -0 jakarta-jmeter/src/core/org/apache/jmeter/testelement/AbstractTestElement.java Index: AbstractTestElement.java =================================================================== RCS file: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/testelement/AbstractTestElement.java,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- AbstractTestElement.java 10 Dec 2004 21:32:52 -0000 1.42 +++ AbstractTestElement.java 20 Mar 2005 21:59:15 -0000 1.43 @@ -485,4 +485,13 @@ public boolean canRemove(){ return true; } + + // Moved from JMeter class + public boolean isEnabled() + { + return + getProperty(TestElement.ENABLED) instanceof NullProperty + || + getPropertyAsBoolean(TestElement.ENABLED); + } } 1.14 +9 -2 jakarta-jmeter/src/core/org/apache/jmeter/testelement/TestElement.java Index: TestElement.java =================================================================== RCS file: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/testelement/TestElement.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- TestElement.java 6 Oct 2004 14:43:52 -0000 1.13 +++ TestElement.java 20 Mar 2005 21:59:15 -0000 1.14 @@ -38,6 +38,13 @@ public void setProperty(String key,String value); + /** + * Check if ENABLED property is present and true ; defaults to true + * + * @return true if element is enabled + */ + public boolean isEnabled(); + /** * Returns true or false whether the element is the running version. */
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]