You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2017/02/28 19:57:38 UTC

svn commit: r1784799 - in /jmeter/trunk/src/core/org/apache/jmeter: gui/action/AbstractAction.java resources/messages.properties

Author: pmouawad
Date: Tue Feb 28 19:57:38 2017
New Revision: 1784799

URL: http://svn.apache.org/viewvc?rev=1784799&view=rev
Log:
Bug 58164 Check if file already exists on ResultCollector listener before starting the loadtest
If users cancels popup, don't start test
Reduce labels so that popup is not too big
Fix typo
Bugzilla Id: 58164

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/AbstractAction.java
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/AbstractAction.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/AbstractAction.java?rev=1784799&r1=1784798&r2=1784799&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/AbstractAction.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/AbstractAction.java Tue Feb 28 19:57:38 2017
@@ -82,27 +82,31 @@ public abstract class AbstractAction imp
             if (f.exists()) {
                 String[] option = new String[] { JMeterUtils.getResString("concat_result"),
                         JMeterUtils.getResString("dont_start"), JMeterUtils.getResString("replace_file") };
-                String question = MessageFormat.format(JMeterUtils.getResString("ask_existing_file") // $NON-NLS-1$
-                        , rc.getFilename());
-                int response = JOptionPane.YES_OPTION;
-
+                String question = MessageFormat.format(
+                        JMeterUtils.getResString("ask_existing_file"), // $NON-NLS-1$
+                        rc.getFilename());
                 // Interactive question
-                response = JOptionPane.showOptionDialog(null, question, JMeterUtils.getResString("warning"),
-                        JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, null, option, option[0]);
+                int response = JOptionPane.showOptionDialog(GuiPackage.getInstance().getMainFrame(), 
+                        question, JMeterUtils.getResString("warning"),
+                        JOptionPane.YES_NO_CANCEL_OPTION, 
+                        JOptionPane.WARNING_MESSAGE, 
+                        null, 
+                        option, 
+                        option[0]);
 
                 switch (response) {
-                case JOptionPane.NO_OPTION:
-                    // Exit without start the test
-                    return false;
-                case JOptionPane.CANCEL_OPTION:
-                    // replace_file so delete the existing one
-                    f.delete();
-                    break;
-                case JOptionPane.YES_OPTION:
-                    // append is the default behaviour, so nothing to do
-                    break;
-                default:
-                    break;
+                    case JOptionPane.NO_OPTION:
+                        // Exit without start the test
+                        return false;
+                    case JOptionPane.CANCEL_OPTION:
+                        // replace_file so delete the existing one
+                        f.delete();
+                        break;
+                    case JOptionPane.YES_OPTION:
+                        // append is the default behaviour, so nothing to do
+                        break;
+                    default:
+                        return false;
                 }
             }
         }

Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties?rev=1784799&r1=1784798&r2=1784799&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties Tue Feb 28 19:57:38 2017
@@ -104,7 +104,7 @@ appearance=Look and Feel
 apply_naming=Apply Naming Policy
 argument_must_not_be_negative=The Argument must not be negative\!
 arguments_panel_title=Command parameters
-ask_existing_file=The file {0} already exist, what you want to do?
+ask_existing_file=The file {0} already exists, what do you want to do?
 assertion_assume_success=Ignore Status
 assertion_body_resp=Response Body
 assertion_code_resp=Response Code
@@ -199,7 +199,7 @@ comparison_regex_substitution=Substituti
 comparison_response_time=Response Time: 
 comparison_unit=\ ms
 comparison_visualizer_title=Comparison Assertion Visualizer
-concat_result=Append result to the existing files
+concat_result=Append to existing file
 config_element=Config Element
 config_save_settings=Configure
 confirm=Confirm
@@ -824,7 +824,7 @@ remove=Remove
 remove_confirm_msg=Are you sure you want remove the selected element(s)?
 remove_confirm_title=Confirm remove?
 rename=Rename entry
-replace_file=Replace existing file
+replace_file=Overwrite existing file
 report=Report
 report_bar_chart=Bar Chart
 report_bar_graph_url=URL