You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2008/02/05 02:55:04 UTC

svn commit: r618508 - in /jakarta/jmeter/trunk/src: components/org/apache/jmeter/extractor/ components/org/apache/jmeter/modifiers/ components/org/apache/jmeter/visualizers/ core/org/apache/jmeter/gui/action/ functions/org/apache/jmeter/functions/ jorp...

Author: sebb
Date: Mon Feb  4 17:55:02 2008
New Revision: 618508

URL: http://svn.apache.org/viewvc?rev=618508&view=rev
Log:
Add some missing svn:eol-style native properties

Modified:
    jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/BeanShellPostProcessor.java   (contents, props changed)
    jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/BeanShellPostProcessorBeanInfo.java   (contents, props changed)
    jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/BeanShellPostProcessorResources.properties   (contents, props changed)
    jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/BeanShellPreProcessor.java   (contents, props changed)
    jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/BeanShellPreProcessorBeanInfo.java   (contents, props changed)
    jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/BeanShellPreProcessorResources.properties   (contents, props changed)
    jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/BeanShellListener.java   (contents, props changed)
    jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/BeanShellListenerBeanInfo.java   (contents, props changed)
    jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/BeanShellListenerResources.properties   (contents, props changed)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/action/LoadRecentProject.java   (contents, props changed)
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/action/RevertProject.java   (contents, props changed)
    jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/Variable.java   (contents, props changed)
    jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/NumberRenderer.java   (contents, props changed)
    jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/RateRenderer.java   (contents, props changed)
    jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/RendererUtils.java   (contents, props changed)
    jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/RightAlignRenderer.java   (contents, props changed)

Modified: jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/BeanShellPostProcessor.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/BeanShellPostProcessor.java?rev=618508&r1=618507&r2=618508&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/BeanShellPostProcessor.java (original)
+++ jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/BeanShellPostProcessor.java Mon Feb  4 17:55:02 2008
@@ -1,69 +1,69 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *  
- */
-
-package org.apache.jmeter.extractor;
-
-import org.apache.jmeter.processor.PostProcessor;
-import org.apache.jmeter.samplers.SampleResult;
-import org.apache.jmeter.testbeans.TestBean;
-import org.apache.jmeter.threads.JMeterContext;
-import org.apache.jmeter.threads.JMeterContextService;
-import org.apache.jmeter.threads.JMeterVariables;
-import org.apache.jmeter.util.BeanShellInterpreter;
-import org.apache.jmeter.util.BeanShellTestElement;
-import org.apache.jorphan.logging.LoggingManager;
-import org.apache.jorphan.util.JMeterException;
-import org.apache.log.Logger;
-
-public class BeanShellPostProcessor extends BeanShellTestElement 
-    implements Cloneable, PostProcessor, TestBean
-{
-    private static final Logger log = LoggingManager.getLoggerForClass();
-    
-    private static final long serialVersionUID = 4;
-    
-    // can be specified in jmeter.properties
-    private static final String INIT_FILE = "beanshell.postprocessor.init"; //$NON-NLS-1$
-
-    protected String getInitFileProperty() {
-        return INIT_FILE;
-    }
-    
-     public void process() {
-        JMeterContext jmctx = JMeterContextService.getContext();
-
-        SampleResult prev = jmctx.getPreviousResult();
-		final BeanShellInterpreter bshInterpreter = getBeanShellInterpreter();
-		if (prev == null || bshInterpreter == null) {
-        	log.error("BeanShell not found");
-			return;
-		}
-
-        JMeterVariables vars = jmctx.getVariables();
-        try {
-            // Add variables for access to context and variables
-            bshInterpreter.set("ctx", jmctx);//$NON-NLS-1$
-            bshInterpreter.set("vars", vars);//$NON-NLS-1$
-            bshInterpreter.set("prev", prev);//$NON-NLS-1$
-            bshInterpreter.set("data", prev.getResponseData());//$NON-NLS-1$
-            processFileOrScript(bshInterpreter);
-        } catch (JMeterException e) {
-            log.warn("Problem in BeanShell script "+e);
-        }
-	}
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *  
+ */
+
+package org.apache.jmeter.extractor;
+
+import org.apache.jmeter.processor.PostProcessor;
+import org.apache.jmeter.samplers.SampleResult;
+import org.apache.jmeter.testbeans.TestBean;
+import org.apache.jmeter.threads.JMeterContext;
+import org.apache.jmeter.threads.JMeterContextService;
+import org.apache.jmeter.threads.JMeterVariables;
+import org.apache.jmeter.util.BeanShellInterpreter;
+import org.apache.jmeter.util.BeanShellTestElement;
+import org.apache.jorphan.logging.LoggingManager;
+import org.apache.jorphan.util.JMeterException;
+import org.apache.log.Logger;
+
+public class BeanShellPostProcessor extends BeanShellTestElement 
+    implements Cloneable, PostProcessor, TestBean
+{
+    private static final Logger log = LoggingManager.getLoggerForClass();
+    
+    private static final long serialVersionUID = 4;
+    
+    // can be specified in jmeter.properties
+    private static final String INIT_FILE = "beanshell.postprocessor.init"; //$NON-NLS-1$
+
+    protected String getInitFileProperty() {
+        return INIT_FILE;
+    }
+    
+     public void process() {
+        JMeterContext jmctx = JMeterContextService.getContext();
+
+        SampleResult prev = jmctx.getPreviousResult();
+		final BeanShellInterpreter bshInterpreter = getBeanShellInterpreter();
+		if (prev == null || bshInterpreter == null) {
+        	log.error("BeanShell not found");
+			return;
+		}
+
+        JMeterVariables vars = jmctx.getVariables();
+        try {
+            // Add variables for access to context and variables
+            bshInterpreter.set("ctx", jmctx);//$NON-NLS-1$
+            bshInterpreter.set("vars", vars);//$NON-NLS-1$
+            bshInterpreter.set("prev", prev);//$NON-NLS-1$
+            bshInterpreter.set("data", prev.getResponseData());//$NON-NLS-1$
+            processFileOrScript(bshInterpreter);
+        } catch (JMeterException e) {
+            log.warn("Problem in BeanShell script "+e);
+        }
+	}
+}

Propchange: jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/BeanShellPostProcessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/BeanShellPostProcessorBeanInfo.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/BeanShellPostProcessorBeanInfo.java?rev=618508&r1=618507&r2=618508&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/BeanShellPostProcessorBeanInfo.java (original)
+++ jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/BeanShellPostProcessorBeanInfo.java Mon Feb  4 17:55:02 2008
@@ -1,29 +1,29 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *  
- */
-
-package org.apache.jmeter.extractor;
-
-import org.apache.jmeter.util.BeanShellBeanInfoSupport;
-
-public class BeanShellPostProcessorBeanInfo extends BeanShellBeanInfoSupport {
-
-	public BeanShellPostProcessorBeanInfo() {
-		super(BeanShellPostProcessor.class);
-	}
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *  
+ */
+
+package org.apache.jmeter.extractor;
+
+import org.apache.jmeter.util.BeanShellBeanInfoSupport;
+
+public class BeanShellPostProcessorBeanInfo extends BeanShellBeanInfoSupport {
+
+	public BeanShellPostProcessorBeanInfo() {
+		super(BeanShellPostProcessor.class);
+	}
+
+}

Propchange: jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/BeanShellPostProcessorBeanInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/BeanShellPostProcessorResources.properties
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/BeanShellPostProcessorResources.properties?rev=618508&r1=618507&r2=618508&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/BeanShellPostProcessorResources.properties (original)
+++ jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/BeanShellPostProcessorResources.properties Mon Feb  4 17:55:02 2008
@@ -1,10 +1,10 @@
-displayName=BeanShell PostProcessor
-scripting.displayName=Script (variables: ctx vars prev data log)
-script.displayName=
-script.shortDescription=Beanshell script
-parameterGroup.displayName=Parameters to be passed to BeanShell (=> String Parameters and String []bsh.args)
-parameters.displayName=Parameters
-parameters.shortDescription=Parameters to be passed to BeanShell (file or script)
-filenameGroup.displayName=Script file (overrides script)
-filename.displayName=File Name
+displayName=BeanShell PostProcessor
+scripting.displayName=Script (variables: ctx vars prev data log)
+script.displayName=
+script.shortDescription=Beanshell script
+parameterGroup.displayName=Parameters to be passed to BeanShell (=> String Parameters and String []bsh.args)
+parameters.displayName=Parameters
+parameters.shortDescription=Parameters to be passed to BeanShell (file or script)
+filenameGroup.displayName=Script file (overrides script)
+filename.displayName=File Name
 filename.shortDescription=BeanShell script file (overrides script)

Propchange: jakarta/jmeter/trunk/src/components/org/apache/jmeter/extractor/BeanShellPostProcessorResources.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/BeanShellPreProcessor.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/BeanShellPreProcessor.java?rev=618508&r1=618507&r2=618508&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/BeanShellPreProcessor.java (original)
+++ jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/BeanShellPreProcessor.java Mon Feb  4 17:55:02 2008
@@ -1,70 +1,70 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *  
- */
-
-package org.apache.jmeter.modifiers;
-
-import org.apache.jmeter.processor.PreProcessor;
-import org.apache.jmeter.samplers.SampleResult;
-import org.apache.jmeter.samplers.Sampler;
-import org.apache.jmeter.testbeans.TestBean;
-import org.apache.jmeter.threads.JMeterContext;
-import org.apache.jmeter.threads.JMeterContextService;
-import org.apache.jmeter.threads.JMeterVariables;
-import org.apache.jmeter.util.BeanShellInterpreter;
-import org.apache.jmeter.util.BeanShellTestElement;
-import org.apache.jorphan.logging.LoggingManager;
-import org.apache.jorphan.util.JMeterException;
-import org.apache.log.Logger;
-
-public class BeanShellPreProcessor extends BeanShellTestElement
-    implements Cloneable, PreProcessor, TestBean
-{
-    private static final Logger log = LoggingManager.getLoggerForClass();
-    
-    private static final long serialVersionUID = 4;
-    
-    // can be specified in jmeter.properties
-    private static final String INIT_FILE = "beanshell.preprocessor.init"; //$NON-NLS-1$
-
-    protected String getInitFileProperty() {
-        return INIT_FILE;
-    }
-
-    public void process(){
-        final BeanShellInterpreter bshInterpreter = getBeanShellInterpreter();
-		if (bshInterpreter == null) {
-        	log.error("BeanShell not found");
-        	return;
-        }
-        JMeterContext jmctx = JMeterContextService.getContext();
-        JMeterVariables vars = jmctx.getVariables();
-		Sampler sam = jmctx.getCurrentSampler();
-		SampleResult prev = jmctx.getPreviousResult();
-        try {
-            // Add variables for access to context and variables
-            bshInterpreter.set("ctx", jmctx);//$NON-NLS-1$
-            bshInterpreter.set("vars", vars);//$NON-NLS-1$
-            bshInterpreter.set("sampler", sam);//$NON-NLS-1$
-            bshInterpreter.set("prev", prev);//$NON-NLS-1$
-            
-            processFileOrScript(bshInterpreter);
-        } catch (JMeterException e) {
-            log.warn("Problem in BeanShell script "+e);
-        }
-	}
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *  
+ */
+
+package org.apache.jmeter.modifiers;
+
+import org.apache.jmeter.processor.PreProcessor;
+import org.apache.jmeter.samplers.SampleResult;
+import org.apache.jmeter.samplers.Sampler;
+import org.apache.jmeter.testbeans.TestBean;
+import org.apache.jmeter.threads.JMeterContext;
+import org.apache.jmeter.threads.JMeterContextService;
+import org.apache.jmeter.threads.JMeterVariables;
+import org.apache.jmeter.util.BeanShellInterpreter;
+import org.apache.jmeter.util.BeanShellTestElement;
+import org.apache.jorphan.logging.LoggingManager;
+import org.apache.jorphan.util.JMeterException;
+import org.apache.log.Logger;
+
+public class BeanShellPreProcessor extends BeanShellTestElement
+    implements Cloneable, PreProcessor, TestBean
+{
+    private static final Logger log = LoggingManager.getLoggerForClass();
+    
+    private static final long serialVersionUID = 4;
+    
+    // can be specified in jmeter.properties
+    private static final String INIT_FILE = "beanshell.preprocessor.init"; //$NON-NLS-1$
+
+    protected String getInitFileProperty() {
+        return INIT_FILE;
+    }
+
+    public void process(){
+        final BeanShellInterpreter bshInterpreter = getBeanShellInterpreter();
+		if (bshInterpreter == null) {
+        	log.error("BeanShell not found");
+        	return;
+        }
+        JMeterContext jmctx = JMeterContextService.getContext();
+        JMeterVariables vars = jmctx.getVariables();
+		Sampler sam = jmctx.getCurrentSampler();
+		SampleResult prev = jmctx.getPreviousResult();
+        try {
+            // Add variables for access to context and variables
+            bshInterpreter.set("ctx", jmctx);//$NON-NLS-1$
+            bshInterpreter.set("vars", vars);//$NON-NLS-1$
+            bshInterpreter.set("sampler", sam);//$NON-NLS-1$
+            bshInterpreter.set("prev", prev);//$NON-NLS-1$
+            
+            processFileOrScript(bshInterpreter);
+        } catch (JMeterException e) {
+            log.warn("Problem in BeanShell script "+e);
+        }
+	}
+}

Propchange: jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/BeanShellPreProcessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/BeanShellPreProcessorBeanInfo.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/BeanShellPreProcessorBeanInfo.java?rev=618508&r1=618507&r2=618508&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/BeanShellPreProcessorBeanInfo.java (original)
+++ jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/BeanShellPreProcessorBeanInfo.java Mon Feb  4 17:55:02 2008
@@ -1,29 +1,29 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *  
- */
-
-package org.apache.jmeter.modifiers;
-
-import org.apache.jmeter.util.BeanShellBeanInfoSupport;
-
-public class BeanShellPreProcessorBeanInfo extends BeanShellBeanInfoSupport {
-
-	public BeanShellPreProcessorBeanInfo() {
-		super(BeanShellPreProcessor.class);
-	}
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *  
+ */
+
+package org.apache.jmeter.modifiers;
+
+import org.apache.jmeter.util.BeanShellBeanInfoSupport;
+
+public class BeanShellPreProcessorBeanInfo extends BeanShellBeanInfoSupport {
+
+	public BeanShellPreProcessorBeanInfo() {
+		super(BeanShellPreProcessor.class);
+	}
+
+}

Propchange: jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/BeanShellPreProcessorBeanInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/BeanShellPreProcessorResources.properties
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/BeanShellPreProcessorResources.properties?rev=618508&r1=618507&r2=618508&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/BeanShellPreProcessorResources.properties (original)
+++ jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/BeanShellPreProcessorResources.properties Mon Feb  4 17:55:02 2008
@@ -1,10 +1,10 @@
-displayName=BeanShell PreProcessor
-scripting.displayName=Script (variables: ctx vars prev sampler log)
-script.displayName=
-script.shortDescription=Beanshell script
-parameterGroup.displayName=Parameters to be passed to BeanShell (=> String Parameters and String []bsh.args)
-parameters.displayName=Parameters
-parameters.shortDescription=Parameters to be passed to BeanShell (file or script)
-filenameGroup.displayName=Script file (overrides script)
-filename.displayName=File Name
+displayName=BeanShell PreProcessor
+scripting.displayName=Script (variables: ctx vars prev sampler log)
+script.displayName=
+script.shortDescription=Beanshell script
+parameterGroup.displayName=Parameters to be passed to BeanShell (=> String Parameters and String []bsh.args)
+parameters.displayName=Parameters
+parameters.shortDescription=Parameters to be passed to BeanShell (file or script)
+filenameGroup.displayName=Script file (overrides script)
+filename.displayName=File Name
 filename.shortDescription=BeanShell script file (overrides script)

Propchange: jakarta/jmeter/trunk/src/components/org/apache/jmeter/modifiers/BeanShellPreProcessorResources.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/BeanShellListener.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/BeanShellListener.java?rev=618508&r1=618507&r2=618508&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/BeanShellListener.java (original)
+++ jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/BeanShellListener.java Mon Feb  4 17:55:02 2008
@@ -1,88 +1,88 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.jmeter.visualizers;
-
-import org.apache.jmeter.gui.UnsharedComponent;
-import org.apache.jmeter.samplers.SampleEvent;
-import org.apache.jmeter.samplers.SampleListener;
-import org.apache.jmeter.samplers.SampleResult;
-import org.apache.jmeter.testbeans.TestBean;
-import org.apache.jmeter.threads.JMeterContext;
-import org.apache.jmeter.threads.JMeterContextService;
-import org.apache.jmeter.threads.JMeterVariables;
-import org.apache.jmeter.util.BeanShellInterpreter;
-import org.apache.jmeter.util.BeanShellTestElement;
-import org.apache.jorphan.logging.LoggingManager;
-import org.apache.jorphan.util.JMeterException;
-import org.apache.log.Logger;
-
-public class BeanShellListener extends BeanShellTestElement 
-    implements Cloneable, SampleListener, TestBean, Visualizer, UnsharedComponent  {
-	// N.B. Needs to implement Visualizer so that TestBeanGUI can find the correct GUI class
-	// TODO - remove UnsharedComponent ? Probably does not make sense for a TestBean.
-	
-    private static final Logger log = LoggingManager.getLoggerForClass();
-    
-    private static final long serialVersionUID = 4;
-
-    // can be specified in jmeter.properties
-    private static final String INIT_FILE = "beanshell.listener.init"; //$NON-NLS-1$
-
-    protected String getInitFileProperty() {
-        return INIT_FILE;
-    }
-
-	public void sampleOccurred(SampleEvent se) {
-        final BeanShellInterpreter bshInterpreter = getBeanShellInterpreter();
-		if (bshInterpreter == null) {
-            log.error("BeanShell not found");
-            return;
-        }
-        
-        JMeterContext jmctx = JMeterContextService.getContext();
-        JMeterVariables vars = jmctx.getVariables();
-        SampleResult samp=se.getResult();
-        try {
-            // Add variables for access to context and variables
-            bshInterpreter.set("ctx", jmctx);//$NON-NLS-1$
-            bshInterpreter.set("vars", vars);//$NON-NLS-1$
-            bshInterpreter.set("sampleEvent", se);//$NON-NLS-1$
-            bshInterpreter.set("sampleResult", samp);//$NON-NLS-1$
-            processFileOrScript(bshInterpreter);
-        } catch (JMeterException e) {
-            log.warn("Problem in BeanShell script "+e);
-        }		
-	}
-
-	public void sampleStarted(SampleEvent e) {
-	}
-
-	public void sampleStopped(SampleEvent e) {
-	}
-
-	public void add(SampleResult sample) {
-		// TODO Auto-generated method stub
-		
-	}
-
-	public boolean isStats() { // Needed by Visualizer interface
-		return false;
-	}
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.jmeter.visualizers;
+
+import org.apache.jmeter.gui.UnsharedComponent;
+import org.apache.jmeter.samplers.SampleEvent;
+import org.apache.jmeter.samplers.SampleListener;
+import org.apache.jmeter.samplers.SampleResult;
+import org.apache.jmeter.testbeans.TestBean;
+import org.apache.jmeter.threads.JMeterContext;
+import org.apache.jmeter.threads.JMeterContextService;
+import org.apache.jmeter.threads.JMeterVariables;
+import org.apache.jmeter.util.BeanShellInterpreter;
+import org.apache.jmeter.util.BeanShellTestElement;
+import org.apache.jorphan.logging.LoggingManager;
+import org.apache.jorphan.util.JMeterException;
+import org.apache.log.Logger;
+
+public class BeanShellListener extends BeanShellTestElement 
+    implements Cloneable, SampleListener, TestBean, Visualizer, UnsharedComponent  {
+	// N.B. Needs to implement Visualizer so that TestBeanGUI can find the correct GUI class
+	// TODO - remove UnsharedComponent ? Probably does not make sense for a TestBean.
+	
+    private static final Logger log = LoggingManager.getLoggerForClass();
+    
+    private static final long serialVersionUID = 4;
+
+    // can be specified in jmeter.properties
+    private static final String INIT_FILE = "beanshell.listener.init"; //$NON-NLS-1$
+
+    protected String getInitFileProperty() {
+        return INIT_FILE;
+    }
+
+	public void sampleOccurred(SampleEvent se) {
+        final BeanShellInterpreter bshInterpreter = getBeanShellInterpreter();
+		if (bshInterpreter == null) {
+            log.error("BeanShell not found");
+            return;
+        }
+        
+        JMeterContext jmctx = JMeterContextService.getContext();
+        JMeterVariables vars = jmctx.getVariables();
+        SampleResult samp=se.getResult();
+        try {
+            // Add variables for access to context and variables
+            bshInterpreter.set("ctx", jmctx);//$NON-NLS-1$
+            bshInterpreter.set("vars", vars);//$NON-NLS-1$
+            bshInterpreter.set("sampleEvent", se);//$NON-NLS-1$
+            bshInterpreter.set("sampleResult", samp);//$NON-NLS-1$
+            processFileOrScript(bshInterpreter);
+        } catch (JMeterException e) {
+            log.warn("Problem in BeanShell script "+e);
+        }		
+	}
+
+	public void sampleStarted(SampleEvent e) {
+	}
+
+	public void sampleStopped(SampleEvent e) {
+	}
+
+	public void add(SampleResult sample) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public boolean isStats() { // Needed by Visualizer interface
+		return false;
+	}
+
+}

Propchange: jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/BeanShellListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/BeanShellListenerBeanInfo.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/BeanShellListenerBeanInfo.java?rev=618508&r1=618507&r2=618508&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/BeanShellListenerBeanInfo.java (original)
+++ jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/BeanShellListenerBeanInfo.java Mon Feb  4 17:55:02 2008
@@ -1,29 +1,29 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *  
- */
-
-package org.apache.jmeter.visualizers;
-
-import org.apache.jmeter.util.BeanShellBeanInfoSupport;
-
-public class BeanShellListenerBeanInfo extends BeanShellBeanInfoSupport {
-
-	public BeanShellListenerBeanInfo() {
-		super(BeanShellListener.class);
-	}
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *  
+ */
+
+package org.apache.jmeter.visualizers;
+
+import org.apache.jmeter.util.BeanShellBeanInfoSupport;
+
+public class BeanShellListenerBeanInfo extends BeanShellBeanInfoSupport {
+
+	public BeanShellListenerBeanInfo() {
+		super(BeanShellListener.class);
+	}
+
+}

Propchange: jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/BeanShellListenerBeanInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/BeanShellListenerResources.properties
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/BeanShellListenerResources.properties?rev=618508&r1=618507&r2=618508&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/BeanShellListenerResources.properties (original)
+++ jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/BeanShellListenerResources.properties Mon Feb  4 17:55:02 2008
@@ -1,10 +1,10 @@
-displayName=BeanShell Listener
-scripting.displayName=Script (variables: ctx vars sampleEvent sampleResult log)
-script.displayName=
-script.shortDescription=Beanshell script
-parameterGroup.displayName=Parameters to be passed to BeanShell (=> String Parameters and String []bsh.args)
-parameters.displayName=Parameters
-parameters.shortDescription=Parameters to be passed to BeanShell (file or script)
-filenameGroup.displayName=Script file (overrides script)
-filename.displayName=File Name
+displayName=BeanShell Listener
+scripting.displayName=Script (variables: ctx vars sampleEvent sampleResult log)
+script.displayName=
+script.shortDescription=Beanshell script
+parameterGroup.displayName=Parameters to be passed to BeanShell (=> String Parameters and String []bsh.args)
+parameters.displayName=Parameters
+parameters.shortDescription=Parameters to be passed to BeanShell (file or script)
+filenameGroup.displayName=Script file (overrides script)
+filename.displayName=File Name
 filename.shortDescription=BeanShell script file (overrides script)

Propchange: jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/BeanShellListenerResources.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/action/LoadRecentProject.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/action/LoadRecentProject.java?rev=618508&r1=618507&r2=618508&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/action/LoadRecentProject.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/action/LoadRecentProject.java Mon Feb  4 17:55:02 2008
@@ -1,249 +1,249 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.jmeter.gui.action;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.KeyEvent;
-import java.io.File;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-import java.util.prefs.Preferences;
-
-import javax.swing.JMenuItem;
-import javax.swing.JSeparator;
-
-/**
- * Handles the loading of recent files, and also the content and
- * visibility of menu items for loading the recent files
- */
-public class LoadRecentProject extends Load {
-    /** Prefix for the user preference key */
-    private static String USER_PREFS_KEY = "recent_file_"; //$NON-NLS-1$
-    /** The number of menu items used for recent files */
-    private static final int NUMBER_OF_MENU_ITEMS = 9;
-    private static Set commands = new HashSet();
-    static {
-        commands.add(ActionNames.OPEN_RECENT);
-    }
-
-	public LoadRecentProject() {
-		super();
-	}
-
-    public Set getActionNames() {
-        return commands;
-    }
-
-	public void doAction(ActionEvent e) {
-        // We must ask the user if it is ok to close current project
-	    if (!Close.performAction(e)) return;
-        // Load the file for this recent file command
-	    loadProjectFile(e, getRecentFile(e), false);
-	}
-    
-    /**
-     * Get the recent file for the menu item
-     */
-    private File getRecentFile(ActionEvent e) {
-        JMenuItem menuItem = (JMenuItem)e.getSource();
-        // Get the preference for the recent files
-        Preferences prefs = Preferences.userNodeForPackage(LoadRecentProject.class);
-        return new File(getRecentFile(prefs, Integer.parseInt(menuItem.getName())));
-    }
-
-    /**
-     * Get the menu items to add to the menu bar, to get recent file functionality
-     * 
-     * @return a List of JMenuItem and a JSeparator, representing recent files
-     */
-    public static List getRecentFileMenuItems() {
-        LinkedList menuItems = new LinkedList();
-        // Get the preference for the recent files
-        Preferences prefs = Preferences.userNodeForPackage(LoadRecentProject.class);
-        for(int i = 0; i < NUMBER_OF_MENU_ITEMS; i++) {
-            // Create the menu item
-            JMenuItem recentFile = new JMenuItem();
-            // Use the index as the name, used when processing the action
-            recentFile.setName(Integer.toString(i));
-            recentFile.addActionListener(ActionRouter.getInstance());
-            recentFile.setActionCommand(ActionNames.OPEN_RECENT);
-            // Set the KeyStroke to use
-            int shortKey = getShortcutKey(i);
-            if(shortKey >= 0) {
-                recentFile.setMnemonic(shortKey);
-            }            
-            // Add the menu item
-            menuItems.add(recentFile);
-        }
-        // Add separator as the last item
-        JSeparator separator = new JSeparator();
-        separator.setVisible(false);
-        menuItems.add(separator);
-        
-        // Update menu items to reflect recent files
-        updateMenuItems(menuItems, prefs);
-        
-        return menuItems;
-    }
-    
-    /**
-     * Update the content and visibility of the menu items for recent files
-     * 
-     * @param menuItems the JMenuItem and JSeparator to update
-     * @param loadedFileName the file name of the project file that has just
-     * been loaded 
-     */
-    public static void updateRecentFileMenuItems(List menuItems, String loadedFileName) {
-        // Get the preference for the recent files
-        Preferences prefs = Preferences.userNodeForPackage(LoadRecentProject.class);
-        LinkedList newRecentFiles = new LinkedList();
-        // Check if the new file is already in the recent list
-        boolean alreadyExists = false;
-        for(int i = 0; i < NUMBER_OF_MENU_ITEMS; i++) {
-            String recentFilePath = getRecentFile(prefs, i);
-            if(!loadedFileName.equals(recentFilePath)) {
-                newRecentFiles.add(recentFilePath);
-            }
-            else {
-                alreadyExists = true;
-            }
-        }
-        // Add the new file at the start of the list
-        newRecentFiles.add(0, loadedFileName);
-        // Remove the last item from the list if it was a brand new file
-        if(!alreadyExists) {
-            newRecentFiles.removeLast();
-        }
-        // Store the recent files
-        for(int i = 0; i < NUMBER_OF_MENU_ITEMS; i++) {
-            String fileName = (String)newRecentFiles.get(i);
-            if(fileName != null) {
-                setRecentFile(prefs, i, fileName);
-            }
-        }
-        // Update menu items to reflect recent files
-        updateMenuItems(menuItems, prefs);
-    }
-
-    /**
-     * Set the content and visibility of menu items and menu separator,
-     * based on the recent file stored user preferences.
-     */
-    private static void updateMenuItems(List menuItems, Preferences prefs) {
-        // Assume no recent files
-        boolean someRecentFiles = false;
-        // Update the menu items
-        for(int i = 0; i < NUMBER_OF_MENU_ITEMS; i++) {
-            // Get the menu item
-            JMenuItem recentFile = (JMenuItem)menuItems.get(i);
-            
-            // Find and set the file for this recent file command
-            String recentFilePath = getRecentFile(prefs, i);
-            if(recentFilePath != null) {
-                File file = new File(recentFilePath);
-                StringBuffer sb = new StringBuffer(60);
-                if (i<9) sb.append(i+1).append(" "); //$NON-NLS-1$
-                sb.append(getMenuItemDisplayName(file));
-                recentFile.setText(sb.toString());
-                recentFile.setToolTipText(recentFilePath);
-                recentFile.setEnabled(true);
-                recentFile.setVisible(true);
-                // At least one recent file menu item is visible
-                someRecentFiles = true;
-            }
-            else {
-                recentFile.setEnabled(false);
-                recentFile.setVisible(false);
-            }
-        }
-        // If there are some recent files, we must make the separator visisble
-        // The separator is the last item in the list
-        JSeparator separator = (JSeparator)menuItems.get(menuItems.size() - 1);
-        separator.setVisible(someRecentFiles);
-    }
-
-    /**
-     * Get the name to display in the menu item, it will chop the file name
-     * if it is too long to display in the menu bar
-     */
-    private static String getMenuItemDisplayName(File file) {
-        // Limit the length of the menu text if needed
-        final int maxLength = 40;
-        String menuText = file.getName();
-        if(menuText.length() > maxLength) {
-            menuText = "..." + menuText.substring(menuText.length() - maxLength, menuText.length()); //$NON-NLS-1$
-        }
-        return menuText;        
-    }
-
-    /**
-     * Get the KeyEvent to use as shortcut key for menu item
-     */
-    private static int getShortcutKey(int index) {
-        int shortKey = -1;
-        switch(index+1) {
-            case 1:
-                shortKey = KeyEvent.VK_1;
-                break;
-            case 2:
-                shortKey = KeyEvent.VK_2;
-                break;
-            case 3:
-                shortKey = KeyEvent.VK_3;
-                break;
-            case 4:
-                shortKey = KeyEvent.VK_4;
-                break;
-            case 5:
-                shortKey = KeyEvent.VK_5;
-                break;
-            case 6:
-                shortKey = KeyEvent.VK_6;
-                break;
-            case 7:
-                shortKey = KeyEvent.VK_7;
-                break;
-            case 8:
-                shortKey = KeyEvent.VK_8;
-                break;
-            case 9:
-                shortKey = KeyEvent.VK_9;
-                break;
-            default:
-                break;
-        }
-        return shortKey;
-    }
-
-    /**
-     * Get the full path to the recent file where index 0 is the most recent
-     */
-    private static String getRecentFile(Preferences prefs, int index) {
-        return prefs.get(USER_PREFS_KEY + index, null);        
-    }
-
-    /**
-     * Set the full path to the recent file where index 0 is the most recent
-     */
-    private static void setRecentFile(Preferences prefs, int index, String fileName) {
-        prefs.put(USER_PREFS_KEY + index, fileName);
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.jmeter.gui.action;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.KeyEvent;
+import java.io.File;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+import java.util.prefs.Preferences;
+
+import javax.swing.JMenuItem;
+import javax.swing.JSeparator;
+
+/**
+ * Handles the loading of recent files, and also the content and
+ * visibility of menu items for loading the recent files
+ */
+public class LoadRecentProject extends Load {
+    /** Prefix for the user preference key */
+    private static String USER_PREFS_KEY = "recent_file_"; //$NON-NLS-1$
+    /** The number of menu items used for recent files */
+    private static final int NUMBER_OF_MENU_ITEMS = 9;
+    private static Set commands = new HashSet();
+    static {
+        commands.add(ActionNames.OPEN_RECENT);
+    }
+
+	public LoadRecentProject() {
+		super();
+	}
+
+    public Set getActionNames() {
+        return commands;
+    }
+
+	public void doAction(ActionEvent e) {
+        // We must ask the user if it is ok to close current project
+	    if (!Close.performAction(e)) return;
+        // Load the file for this recent file command
+	    loadProjectFile(e, getRecentFile(e), false);
+	}
+    
+    /**
+     * Get the recent file for the menu item
+     */
+    private File getRecentFile(ActionEvent e) {
+        JMenuItem menuItem = (JMenuItem)e.getSource();
+        // Get the preference for the recent files
+        Preferences prefs = Preferences.userNodeForPackage(LoadRecentProject.class);
+        return new File(getRecentFile(prefs, Integer.parseInt(menuItem.getName())));
+    }
+
+    /**
+     * Get the menu items to add to the menu bar, to get recent file functionality
+     * 
+     * @return a List of JMenuItem and a JSeparator, representing recent files
+     */
+    public static List getRecentFileMenuItems() {
+        LinkedList menuItems = new LinkedList();
+        // Get the preference for the recent files
+        Preferences prefs = Preferences.userNodeForPackage(LoadRecentProject.class);
+        for(int i = 0; i < NUMBER_OF_MENU_ITEMS; i++) {
+            // Create the menu item
+            JMenuItem recentFile = new JMenuItem();
+            // Use the index as the name, used when processing the action
+            recentFile.setName(Integer.toString(i));
+            recentFile.addActionListener(ActionRouter.getInstance());
+            recentFile.setActionCommand(ActionNames.OPEN_RECENT);
+            // Set the KeyStroke to use
+            int shortKey = getShortcutKey(i);
+            if(shortKey >= 0) {
+                recentFile.setMnemonic(shortKey);
+            }            
+            // Add the menu item
+            menuItems.add(recentFile);
+        }
+        // Add separator as the last item
+        JSeparator separator = new JSeparator();
+        separator.setVisible(false);
+        menuItems.add(separator);
+        
+        // Update menu items to reflect recent files
+        updateMenuItems(menuItems, prefs);
+        
+        return menuItems;
+    }
+    
+    /**
+     * Update the content and visibility of the menu items for recent files
+     * 
+     * @param menuItems the JMenuItem and JSeparator to update
+     * @param loadedFileName the file name of the project file that has just
+     * been loaded 
+     */
+    public static void updateRecentFileMenuItems(List menuItems, String loadedFileName) {
+        // Get the preference for the recent files
+        Preferences prefs = Preferences.userNodeForPackage(LoadRecentProject.class);
+        LinkedList newRecentFiles = new LinkedList();
+        // Check if the new file is already in the recent list
+        boolean alreadyExists = false;
+        for(int i = 0; i < NUMBER_OF_MENU_ITEMS; i++) {
+            String recentFilePath = getRecentFile(prefs, i);
+            if(!loadedFileName.equals(recentFilePath)) {
+                newRecentFiles.add(recentFilePath);
+            }
+            else {
+                alreadyExists = true;
+            }
+        }
+        // Add the new file at the start of the list
+        newRecentFiles.add(0, loadedFileName);
+        // Remove the last item from the list if it was a brand new file
+        if(!alreadyExists) {
+            newRecentFiles.removeLast();
+        }
+        // Store the recent files
+        for(int i = 0; i < NUMBER_OF_MENU_ITEMS; i++) {
+            String fileName = (String)newRecentFiles.get(i);
+            if(fileName != null) {
+                setRecentFile(prefs, i, fileName);
+            }
+        }
+        // Update menu items to reflect recent files
+        updateMenuItems(menuItems, prefs);
+    }
+
+    /**
+     * Set the content and visibility of menu items and menu separator,
+     * based on the recent file stored user preferences.
+     */
+    private static void updateMenuItems(List menuItems, Preferences prefs) {
+        // Assume no recent files
+        boolean someRecentFiles = false;
+        // Update the menu items
+        for(int i = 0; i < NUMBER_OF_MENU_ITEMS; i++) {
+            // Get the menu item
+            JMenuItem recentFile = (JMenuItem)menuItems.get(i);
+            
+            // Find and set the file for this recent file command
+            String recentFilePath = getRecentFile(prefs, i);
+            if(recentFilePath != null) {
+                File file = new File(recentFilePath);
+                StringBuffer sb = new StringBuffer(60);
+                if (i<9) sb.append(i+1).append(" "); //$NON-NLS-1$
+                sb.append(getMenuItemDisplayName(file));
+                recentFile.setText(sb.toString());
+                recentFile.setToolTipText(recentFilePath);
+                recentFile.setEnabled(true);
+                recentFile.setVisible(true);
+                // At least one recent file menu item is visible
+                someRecentFiles = true;
+            }
+            else {
+                recentFile.setEnabled(false);
+                recentFile.setVisible(false);
+            }
+        }
+        // If there are some recent files, we must make the separator visisble
+        // The separator is the last item in the list
+        JSeparator separator = (JSeparator)menuItems.get(menuItems.size() - 1);
+        separator.setVisible(someRecentFiles);
+    }
+
+    /**
+     * Get the name to display in the menu item, it will chop the file name
+     * if it is too long to display in the menu bar
+     */
+    private static String getMenuItemDisplayName(File file) {
+        // Limit the length of the menu text if needed
+        final int maxLength = 40;
+        String menuText = file.getName();
+        if(menuText.length() > maxLength) {
+            menuText = "..." + menuText.substring(menuText.length() - maxLength, menuText.length()); //$NON-NLS-1$
+        }
+        return menuText;        
+    }
+
+    /**
+     * Get the KeyEvent to use as shortcut key for menu item
+     */
+    private static int getShortcutKey(int index) {
+        int shortKey = -1;
+        switch(index+1) {
+            case 1:
+                shortKey = KeyEvent.VK_1;
+                break;
+            case 2:
+                shortKey = KeyEvent.VK_2;
+                break;
+            case 3:
+                shortKey = KeyEvent.VK_3;
+                break;
+            case 4:
+                shortKey = KeyEvent.VK_4;
+                break;
+            case 5:
+                shortKey = KeyEvent.VK_5;
+                break;
+            case 6:
+                shortKey = KeyEvent.VK_6;
+                break;
+            case 7:
+                shortKey = KeyEvent.VK_7;
+                break;
+            case 8:
+                shortKey = KeyEvent.VK_8;
+                break;
+            case 9:
+                shortKey = KeyEvent.VK_9;
+                break;
+            default:
+                break;
+        }
+        return shortKey;
+    }
+
+    /**
+     * Get the full path to the recent file where index 0 is the most recent
+     */
+    private static String getRecentFile(Preferences prefs, int index) {
+        return prefs.get(USER_PREFS_KEY + index, null);        
+    }
+
+    /**
+     * Set the full path to the recent file where index 0 is the most recent
+     */
+    private static void setRecentFile(Preferences prefs, int index, String fileName) {
+        prefs.put(USER_PREFS_KEY + index, fileName);
+    }
+}

Propchange: jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/action/LoadRecentProject.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/action/RevertProject.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/action/RevertProject.java?rev=618508&r1=618507&r2=618508&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/action/RevertProject.java (original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/action/RevertProject.java Mon Feb  4 17:55:02 2008
@@ -1,74 +1,74 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.jmeter.gui.action;
-
-import java.awt.event.ActionEvent;
-import java.io.File;
-import java.util.HashSet;
-import java.util.Set;
-import javax.swing.JOptionPane;
-
-import org.apache.jmeter.gui.GuiPackage;
-import org.apache.jmeter.util.JMeterUtils;
-
-/**
- * Handles the Revert Project command.
- *
- */
-public class RevertProject implements Command {
-	private static Set commands = new HashSet();
-	static {
-		commands.add(ActionNames.REVERT_PROJECT);
-	}
-
-	public RevertProject() {
-		super();
-	}
-
-	public Set getActionNames() {
-		return commands;
-	}
-
-	public void doAction(ActionEvent e) {
-		// Get the file name of the current project
-		String projectFile = GuiPackage.getInstance().getTestPlanFile();
-		// Check if the user has loaded any file
-		if(projectFile == null) {
-			return;
-		}
-		
-        // Check if the user wants to drop any changes
-		ActionRouter.getInstance().doActionNow(new ActionEvent(e.getSource(), e.getID(), ActionNames.CHECK_DIRTY));
-		GuiPackage guiPackage = GuiPackage.getInstance();
-		if (guiPackage.isDirty()) {
-			// Check if the user wants to revert
-			int response = JOptionPane.showConfirmDialog(GuiPackage.getInstance().getMainFrame(), 
-					JMeterUtils.getResString("cancel_revert_project"), // $NON-NLS-1$
-					JMeterUtils.getResString("revert_project?"),  // $NON-NLS-1$
-					JOptionPane.YES_NO_OPTION,
-					JOptionPane.QUESTION_MESSAGE);
-			if(response == JOptionPane.YES_OPTION) {
-				// Close the current project
-				Close.closeProject(e);
-				// Reload the project
-				Load.loadProjectFile(e, new File(projectFile), false);
-			}
-		}
-	}
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.jmeter.gui.action;
+
+import java.awt.event.ActionEvent;
+import java.io.File;
+import java.util.HashSet;
+import java.util.Set;
+import javax.swing.JOptionPane;
+
+import org.apache.jmeter.gui.GuiPackage;
+import org.apache.jmeter.util.JMeterUtils;
+
+/**
+ * Handles the Revert Project command.
+ *
+ */
+public class RevertProject implements Command {
+	private static Set commands = new HashSet();
+	static {
+		commands.add(ActionNames.REVERT_PROJECT);
+	}
+
+	public RevertProject() {
+		super();
+	}
+
+	public Set getActionNames() {
+		return commands;
+	}
+
+	public void doAction(ActionEvent e) {
+		// Get the file name of the current project
+		String projectFile = GuiPackage.getInstance().getTestPlanFile();
+		// Check if the user has loaded any file
+		if(projectFile == null) {
+			return;
+		}
+		
+        // Check if the user wants to drop any changes
+		ActionRouter.getInstance().doActionNow(new ActionEvent(e.getSource(), e.getID(), ActionNames.CHECK_DIRTY));
+		GuiPackage guiPackage = GuiPackage.getInstance();
+		if (guiPackage.isDirty()) {
+			// Check if the user wants to revert
+			int response = JOptionPane.showConfirmDialog(GuiPackage.getInstance().getMainFrame(), 
+					JMeterUtils.getResString("cancel_revert_project"), // $NON-NLS-1$
+					JMeterUtils.getResString("revert_project?"),  // $NON-NLS-1$
+					JOptionPane.YES_NO_OPTION,
+					JOptionPane.QUESTION_MESSAGE);
+			if(response == JOptionPane.YES_OPTION) {
+				// Close the current project
+				Close.closeProject(e);
+				// Reload the project
+				Load.loadProjectFile(e, new File(projectFile), false);
+			}
+		}
+	}
+}

Propchange: jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/action/RevertProject.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/Variable.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/Variable.java?rev=618508&r1=618507&r2=618508&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/Variable.java (original)
+++ jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/Variable.java Mon Feb  4 17:55:02 2008
@@ -1,88 +1,88 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.jmeter.functions;
-
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.apache.jmeter.engine.util.CompoundVariable;
-import org.apache.jmeter.samplers.SampleResult;
-import org.apache.jmeter.samplers.Sampler;
-import org.apache.jmeter.util.JMeterUtils;
-
-/**
- * Function to get a JMeter Variable
- * 
- * Parameters: 
- * - variable name
- * 
- * Returns: 
- * - the variable value, but if not found 
- * - the variable name itself
- * 
- */
-public class Variable extends AbstractFunction implements Serializable {
-
-	private static final long serialVersionUID = 232L;
-	
-	private static final List desc = new LinkedList();
-
-	private static final String KEY = "__V"; //$NON-NLS-1$
-
-	// Number of parameters expected - used to reject invalid calls
-	private static final int MIN_PARAMETER_COUNT = 1;
-	private static final int MAX_PARAMETER_COUNT = 1;
-	
-	static {
-		desc.add(JMeterUtils.getResString("variable_name_param")); //$NON-NLS-1$
-	}
-
-	private Object[] values;
-
-	public Variable() {
-	}
-
-	public Object clone() throws CloneNotSupportedException {
-		return super.clone();
-	}
-
-	public synchronized String execute(SampleResult previousResult, Sampler currentSampler)
-			throws InvalidVariableException {
-		String variableName = ((CompoundVariable) values[0]).execute();
-		String variableValue = getVariables().get(variableName);
-		return variableValue == null? variableName : variableValue;
-
-	}
-
-	public synchronized void setParameters(Collection parameters) throws InvalidVariableException {
-		checkParameterCount(parameters, MIN_PARAMETER_COUNT, MAX_PARAMETER_COUNT);
-		values = parameters.toArray();
-	}
-
-	public String getReferenceKey() {
-		return KEY;
-	}
-
-	public List getArgumentDesc() {
-		return desc;
-	}
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.jmeter.functions;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.apache.jmeter.engine.util.CompoundVariable;
+import org.apache.jmeter.samplers.SampleResult;
+import org.apache.jmeter.samplers.Sampler;
+import org.apache.jmeter.util.JMeterUtils;
+
+/**
+ * Function to get a JMeter Variable
+ * 
+ * Parameters: 
+ * - variable name
+ * 
+ * Returns: 
+ * - the variable value, but if not found 
+ * - the variable name itself
+ * 
+ */
+public class Variable extends AbstractFunction implements Serializable {
+
+	private static final long serialVersionUID = 232L;
+	
+	private static final List desc = new LinkedList();
+
+	private static final String KEY = "__V"; //$NON-NLS-1$
+
+	// Number of parameters expected - used to reject invalid calls
+	private static final int MIN_PARAMETER_COUNT = 1;
+	private static final int MAX_PARAMETER_COUNT = 1;
+	
+	static {
+		desc.add(JMeterUtils.getResString("variable_name_param")); //$NON-NLS-1$
+	}
+
+	private Object[] values;
+
+	public Variable() {
+	}
+
+	public Object clone() throws CloneNotSupportedException {
+		return super.clone();
+	}
+
+	public synchronized String execute(SampleResult previousResult, Sampler currentSampler)
+			throws InvalidVariableException {
+		String variableName = ((CompoundVariable) values[0]).execute();
+		String variableValue = getVariables().get(variableName);
+		return variableValue == null? variableName : variableValue;
+
+	}
+
+	public synchronized void setParameters(Collection parameters) throws InvalidVariableException {
+		checkParameterCount(parameters, MIN_PARAMETER_COUNT, MAX_PARAMETER_COUNT);
+		values = parameters.toArray();
+	}
+
+	public String getReferenceKey() {
+		return KEY;
+	}
+
+	public List getArgumentDesc() {
+		return desc;
+	}
+
 }

Propchange: jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/Variable.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/NumberRenderer.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/NumberRenderer.java?rev=618508&r1=618507&r2=618508&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/NumberRenderer.java (original)
+++ jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/NumberRenderer.java Mon Feb  4 17:55:02 2008
@@ -1,48 +1,48 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.jorphan.gui;
-
-import java.text.DecimalFormat;
-import java.text.NumberFormat;
-
-import javax.swing.JLabel;
-import javax.swing.table.DefaultTableCellRenderer;
-
-/**
- * Renders numbers in a JTable with a specified format 
- */
-public class NumberRenderer extends DefaultTableCellRenderer {
-	protected final NumberFormat formatter;
-
-    public NumberRenderer() {
-    	super();
-    	formatter = NumberFormat.getInstance();
-    	setHorizontalAlignment(JLabel.RIGHT);
-    }
-    
-    public NumberRenderer(String format) {
-    	super();
-    	formatter = new DecimalFormat(format);
-    	setHorizontalAlignment(JLabel.RIGHT);
-    }
-    
-	public void setValue(Object value) {
-	    setText((value == null) ? "" : formatter.format(value));
-	}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.jorphan.gui;
+
+import java.text.DecimalFormat;
+import java.text.NumberFormat;
+
+import javax.swing.JLabel;
+import javax.swing.table.DefaultTableCellRenderer;
+
+/**
+ * Renders numbers in a JTable with a specified format 
+ */
+public class NumberRenderer extends DefaultTableCellRenderer {
+	protected final NumberFormat formatter;
+
+    public NumberRenderer() {
+    	super();
+    	formatter = NumberFormat.getInstance();
+    	setHorizontalAlignment(JLabel.RIGHT);
+    }
+    
+    public NumberRenderer(String format) {
+    	super();
+    	formatter = new DecimalFormat(format);
+    	setHorizontalAlignment(JLabel.RIGHT);
+    }
+    
+	public void setValue(Object value) {
+	    setText((value == null) ? "" : formatter.format(value));
+	}
 }

Propchange: jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/NumberRenderer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/RateRenderer.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/RateRenderer.java?rev=618508&r1=618507&r2=618508&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/RateRenderer.java (original)
+++ jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/RateRenderer.java Mon Feb  4 17:55:02 2008
@@ -1,44 +1,44 @@
-package org.apache.jorphan.gui;
-
-/**
- * Renders a rate in a JTable.
- * 
- * The output is in units appropriate to its dimension:
- * <p>
- * The number is represented in one of:
- * - requests/second
- * - requests/minute
- * - requests/hour.
- * <p>
- * Examples: "34.2/sec" "0.1/sec" "43.0/hour" "15.9/min"
- */
-public class RateRenderer extends NumberRenderer{
-
-	public RateRenderer(String format) {
-		super(format);
-	}
-	
-	public void setValue(Object value) {
-		if (value == null || ! (value instanceof Double)) {
-			setText("#N/A"); // TODO: should this just call super()?
-			return;
-		}
-		double rate = ((Double) value).doubleValue();
-		if (rate == Double.MAX_VALUE){
-			setText("#N/A"); // TODO: should this just call super()?
-			return;
-		}
-		
-	    String unit = "sec";
-
-	    if (rate < 1.0) {
-	        rate *= 60.0;
-	        unit = "min";
-	    }
-	    if (rate < 1.0) {
-	        rate *= 60.0;
-	        unit = "hour";
-	    }			
-	    setText(formatter.format(rate) + "/" + unit);
-	}
+package org.apache.jorphan.gui;
+
+/**
+ * Renders a rate in a JTable.
+ * 
+ * The output is in units appropriate to its dimension:
+ * <p>
+ * The number is represented in one of:
+ * - requests/second
+ * - requests/minute
+ * - requests/hour.
+ * <p>
+ * Examples: "34.2/sec" "0.1/sec" "43.0/hour" "15.9/min"
+ */
+public class RateRenderer extends NumberRenderer{
+
+	public RateRenderer(String format) {
+		super(format);
+	}
+	
+	public void setValue(Object value) {
+		if (value == null || ! (value instanceof Double)) {
+			setText("#N/A"); // TODO: should this just call super()?
+			return;
+		}
+		double rate = ((Double) value).doubleValue();
+		if (rate == Double.MAX_VALUE){
+			setText("#N/A"); // TODO: should this just call super()?
+			return;
+		}
+		
+	    String unit = "sec";
+
+	    if (rate < 1.0) {
+	        rate *= 60.0;
+	        unit = "min";
+	    }
+	    if (rate < 1.0) {
+	        rate *= 60.0;
+	        unit = "hour";
+	    }			
+	    setText(formatter.format(rate) + "/" + unit);
+	}
 }

Propchange: jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/RateRenderer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/RendererUtils.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/RendererUtils.java?rev=618508&r1=618507&r2=618508&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/RendererUtils.java (original)
+++ jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/RendererUtils.java Mon Feb  4 17:55:02 2008
@@ -1,41 +1,41 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.jorphan.gui;
-
-import javax.swing.JTable;
-import javax.swing.table.TableCellRenderer;
-import javax.swing.table.TableColumnModel;
-
-/**
- * Utility class for Renderers
- */
-public class RendererUtils {
-    private RendererUtils(){
-    	// uninstantiable
-    }
-    public static void applyRenderers(final JTable table, final TableCellRenderer [] renderers){
-		final TableColumnModel columnModel = table.getColumnModel();
-		for(int i = 0; i < renderers.length; i++){
-		    final TableCellRenderer rend = renderers[i];
-		    if (rend != null) {
-			    columnModel.getColumn(i).setCellRenderer(rend);
-		    }
-		}
-}
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.jorphan.gui;
+
+import javax.swing.JTable;
+import javax.swing.table.TableCellRenderer;
+import javax.swing.table.TableColumnModel;
+
+/**
+ * Utility class for Renderers
+ */
+public class RendererUtils {
+    private RendererUtils(){
+    	// uninstantiable
+    }
+    public static void applyRenderers(final JTable table, final TableCellRenderer [] renderers){
+		final TableColumnModel columnModel = table.getColumnModel();
+		for(int i = 0; i < renderers.length; i++){
+		    final TableCellRenderer rend = renderers[i];
+		    if (rend != null) {
+			    columnModel.getColumn(i).setCellRenderer(rend);
+		    }
+		}
+}
+}

Propchange: jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/RendererUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/RightAlignRenderer.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/RightAlignRenderer.java?rev=618508&r1=618507&r2=618508&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/RightAlignRenderer.java (original)
+++ jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/RightAlignRenderer.java Mon Feb  4 17:55:02 2008
@@ -1,32 +1,32 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.jorphan.gui;
-
-import javax.swing.JLabel;
-import javax.swing.table.DefaultTableCellRenderer;
-
-/**
- * Renders items in a JTable right-aligned
- */
-public class RightAlignRenderer extends DefaultTableCellRenderer {
-    public RightAlignRenderer() {
-    	super();
-    	setHorizontalAlignment(JLabel.RIGHT);
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.jorphan.gui;
+
+import javax.swing.JLabel;
+import javax.swing.table.DefaultTableCellRenderer;
+
+/**
+ * Renders items in a JTable right-aligned
+ */
+public class RightAlignRenderer extends DefaultTableCellRenderer {
+    public RightAlignRenderer() {
+    	super();
+    	setHorizontalAlignment(JLabel.RIGHT);
+    }
 }

Propchange: jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/RightAlignRenderer.java
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org