jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1818753 - in /jmeter/trunk/src/components/org/apache/jmeter: assertions/ assertions/gui/ extractor/ extractor/gui/ extractor/json/jsonpath/gui/ sampler/ timers/gui/ visualizers/
Date Wed, 20 Dec 2017 08:56:03 GMT
Author: pmouawad
Date: Wed Dec 20 08:56:03 2017
New Revision: 1818753

URL: http://svn.apache.org/viewvc?rev=1818753&view=rev
Log:
Bug 61919 - UX : Reorder Menus
Contributed by Graham Russell
Reordered menus (3/3)
This closes #360
Bugzilla Id: 61919

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/assertions/JSR223Assertion.java
    jmeter/trunk/src/components/org/apache/jmeter/assertions/ResponseAssertion.java
    jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/AssertionGui.java
    jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/JSONPathAssertionGui.java
    jmeter/trunk/src/components/org/apache/jmeter/extractor/JSoupExtractor.java
    jmeter/trunk/src/components/org/apache/jmeter/extractor/JoddExtractor.java
    jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/HtmlExtractorGui.java
    jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/RegexExtractorGui.java
    jmeter/trunk/src/components/org/apache/jmeter/extractor/json/jsonpath/gui/JSONPostProcessorGui.java
    jmeter/trunk/src/components/org/apache/jmeter/sampler/DebugSampler.java
    jmeter/trunk/src/components/org/apache/jmeter/timers/gui/ConstantTimerGui.java
    jmeter/trunk/src/components/org/apache/jmeter/timers/gui/UniformRandomTimerGui.java
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatVisualizer.java
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/SummaryReport.java
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/assertions/JSR223Assertion.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/assertions/JSR223Assertion.java?rev=1818753&r1=1818752&r2=1818753&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/assertions/JSR223Assertion.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/assertions/JSR223Assertion.java Wed Dec
20 08:56:03 2017
@@ -24,12 +24,14 @@ import javax.script.Bindings;
 import javax.script.ScriptEngine;
 import javax.script.ScriptException;
 
+import org.apache.jmeter.gui.GUIMenuSortOrder;
 import org.apache.jmeter.samplers.SampleResult;
 import org.apache.jmeter.testbeans.TestBean;
 import org.apache.jmeter.util.JSR223TestElement;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+@GUIMenuSortOrder(3)
 public class JSR223Assertion extends JSR223TestElement implements Cloneable, Assertion, TestBean
 {
     private static final Logger log = LoggerFactory.getLogger(JSR223Assertion.class);

Modified: jmeter/trunk/src/components/org/apache/jmeter/assertions/ResponseAssertion.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/assertions/ResponseAssertion.java?rev=1818753&r1=1818752&r2=1818753&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/assertions/ResponseAssertion.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/assertions/ResponseAssertion.java Wed Dec
20 08:56:03 2017
@@ -40,8 +40,8 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Test element to handle Response Assertions, @see AssertionGui
- * see org.apache.jmeter.assertions.ResponseAssertionTest for unit tests
+ * Test element to handle Response Assertions.
+ * See {@link AssertionGui} for GUI.
  */
 public class ResponseAssertion extends AbstractScopedAssertion implements Serializable, Assertion
{
     private static final Logger log = LoggerFactory.getLogger(ResponseAssertion.class);
@@ -53,25 +53,15 @@ public class ResponseAssertion extends A
     // Values for TEST_FIELD
     // N.B. we cannot change the text value as it is in test plans
     private static final String SAMPLE_URL = "Assertion.sample_label"; // $NON-NLS-1$
-
     private static final String RESPONSE_DATA = "Assertion.response_data"; // $NON-NLS-1$
-
     private static final String RESPONSE_DATA_AS_DOCUMENT = "Assertion.response_data_as_document";
// $NON-NLS-1$
-
     private static final String RESPONSE_CODE = "Assertion.response_code"; // $NON-NLS-1$
-
     private static final String RESPONSE_MESSAGE = "Assertion.response_message"; // $NON-NLS-1$
-
     private static final String RESPONSE_HEADERS = "Assertion.response_headers"; // $NON-NLS-1$
-    
     private static final String REQUEST_HEADERS = "Assertion.request_headers"; // $NON-NLS-1$
-    
     private static final String REQUEST_DATA = "Assertion.request_data"; // $NON-NLS-1$
-
     private static final String ASSUME_SUCCESS = "Assertion.assume_success"; // $NON-NLS-1$
-
     private static final String TEST_STRINGS = "Asserion.test_strings"; // $NON-NLS-1$
-
     private static final String TEST_TYPE = "Assertion.test_type"; // $NON-NLS-1$
 
     /**
@@ -79,15 +69,10 @@ public class ResponseAssertion extends A
      * they are mutually exclusive
      */
     private static final int MATCH = 1; // 1 << 0; // NOSONAR We want this comment
-
     private static final int CONTAINS = 1 << 1;
-
     private static final int NOT = 1 << 2;
-
     private static final int EQUALS = 1 << 3;
-
     private static final int SUBSTRING = 1 << 4;
-
     private static final int OR = 1 << 5;
 
     // Mask should contain all types (but not NOT nor OR)
@@ -289,8 +274,7 @@ public class ResponseAssertion extends A
     /**
      * Make sure the response satisfies the specified assertion requirements.
      *
-     * @param response
-     *            an instance of SampleResult
+     * @param response an instance of SampleResult
      * @return an instance of AssertionResult
      */
     private AssertionResult evaluateResponse(SampleResult response) {
@@ -472,9 +456,7 @@ public class ResponseAssertion extends A
         return sb.toString();
     }
 
-
-    private static String trunc(final boolean right, final String str)
-    {
+    private static String trunc(final boolean right, final String str) {
         if (str.length() <= EQUALS_SECTION_DIFF_LEN) {
             return str;
         } else if (right) {

Modified: jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/AssertionGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/AssertionGui.java?rev=1818753&r1=1818752&r2=1818753&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/AssertionGui.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/AssertionGui.java Wed Dec
20 08:56:03 2017
@@ -42,6 +42,7 @@ import javax.swing.JToggleButton;
 import javax.swing.ListSelectionModel;
 
 import org.apache.jmeter.assertions.ResponseAssertion;
+import org.apache.jmeter.gui.GUIMenuSortOrder;
 import org.apache.jmeter.gui.GuiPackage;
 import org.apache.jmeter.gui.util.HeaderAsPropertyRenderer;
 import org.apache.jmeter.gui.util.PowerTableModel;
@@ -54,8 +55,8 @@ import org.apache.jorphan.gui.GuiUtils;
 
 /**
  * GUI interface for a {@link ResponseAssertion}.
- *
  */
+@GUIMenuSortOrder(1)
 public class AssertionGui extends AbstractAssertionGui {
     private static final long serialVersionUID = 240L;
 

Modified: jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/JSONPathAssertionGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/JSONPathAssertionGui.java?rev=1818753&r1=1818752&r2=1818753&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/JSONPathAssertionGui.java
(original)
+++ jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/JSONPathAssertionGui.java
Wed Dec 20 08:56:03 2017
@@ -25,6 +25,7 @@ import javax.swing.event.ChangeEvent;
 import javax.swing.event.ChangeListener;
 
 import org.apache.jmeter.assertions.JSONPathAssertion;
+import org.apache.jmeter.gui.GUIMenuSortOrder;
 import org.apache.jmeter.gui.util.VerticalPanel;
 import org.apache.jmeter.testelement.TestElement;
 import org.apache.jmeter.util.JMeterUtils;
@@ -35,6 +36,7 @@ import org.apache.jorphan.gui.JLabeledTe
  * Java class representing GUI for the {@link JSONPathAssertion} component in JMeter
  * @since 4.0
  */
+@GUIMenuSortOrder(2)
 public class JSONPathAssertionGui extends AbstractAssertionGui implements ChangeListener
{
 
     private static final long serialVersionUID = -6008018002423594040L;

Modified: jmeter/trunk/src/components/org/apache/jmeter/extractor/JSoupExtractor.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/extractor/JSoupExtractor.java?rev=1818753&r1=1818752&r2=1818753&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/extractor/JSoupExtractor.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/extractor/JSoupExtractor.java Wed Dec 20
08:56:03 2017
@@ -34,22 +34,16 @@ import org.jsoup.select.Elements;
  */
 public class JSoupExtractor implements Extractor {
 
-    /**
-     * 
-     */
     private static final long serialVersionUID = -6308012192067714191L;
 
     private static final String CACHE_KEY_PREFIX = JSoupExtractor.class.getName()+"_PARSED_BODY";
 
-    /**
-     * 
-     */
     public JSoupExtractor() {
         super();
     }
 
     /**
-     * @see org.apache.jmeter.extractor.Extractor#extract(String, String, int, String, List,
int, String)
+     * @see Extractor#extract(String, String, int, String, List, int, String)
      */
     @Override
     public int extract(String expression, String attribute, int matchNumber,

Modified: jmeter/trunk/src/components/org/apache/jmeter/extractor/JoddExtractor.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/extractor/JoddExtractor.java?rev=1818753&r1=1818752&r2=1818753&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/extractor/JoddExtractor.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/extractor/JoddExtractor.java Wed Dec 20
08:56:03 2017
@@ -36,9 +36,6 @@ import jodd.log.impl.Slf4jLogger;
  */
 public class JoddExtractor implements Extractor {
 
-    /**
-     * 
-     */
     private static final long serialVersionUID = -7235814605293262972L;
 
     private static final String CACHE_KEY_PREFIX = JoddExtractor.class.getName()+"_PARSED_BODY";
@@ -47,9 +44,6 @@ public class JoddExtractor implements Ex
         LoggerFactory.setLoggerProvider(Slf4jLogger.PROVIDER);
     }
 
-    /**
-     * 
-     */
     public JoddExtractor() {
         super();
     }

Modified: jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/HtmlExtractorGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/HtmlExtractorGui.java?rev=1818753&r1=1818752&r2=1818753&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/HtmlExtractorGui.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/HtmlExtractorGui.java Wed
Dec 20 08:56:03 2017
@@ -34,6 +34,7 @@ import javax.swing.JLabel;
 import javax.swing.JPanel;
 
 import org.apache.jmeter.extractor.HtmlExtractor;
+import org.apache.jmeter.gui.GUIMenuSortOrder;
 import org.apache.jmeter.gui.util.HorizontalPanel;
 import org.apache.jmeter.processor.gui.AbstractPostProcessorGui;
 import org.apache.jmeter.testelement.AbstractScopedTestElement;
@@ -45,6 +46,7 @@ import org.apache.jorphan.gui.JLabeledTe
  * CSS/JQuery Expression Extractor Post-Processor GUI
  * @since 2.9
  */
+@GUIMenuSortOrder(2)
 public class HtmlExtractorGui extends AbstractPostProcessorGui {
     private static final long serialVersionUID = 240L;
 
@@ -54,17 +56,11 @@ public class HtmlExtractorGui extends Ab
     private static final String USE_DEFAULT_EXTRACTOR_IMPL = ""; // $NON-NLS-1$
 
     private JLabeledTextField expressionField;
-
     private JLabeledTextField attributeField;
-    
     private JLabeledTextField defaultField;
-
     private JLabeledTextField matchNumberField;
-
     private JLabeledTextField refNameField;
-
     private JComboBox<String> extractorImplName;
-
     private JCheckBox emptyDefaultValue;
     
     public HtmlExtractorGui() {

Modified: jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/RegexExtractorGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/RegexExtractorGui.java?rev=1818753&r1=1818752&r2=1818753&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/RegexExtractorGui.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/extractor/gui/RegexExtractorGui.java Wed
Dec 20 08:56:03 2017
@@ -32,6 +32,7 @@ import javax.swing.JPanel;
 import javax.swing.JRadioButton;
 
 import org.apache.jmeter.extractor.RegexExtractor;
+import org.apache.jmeter.gui.GUIMenuSortOrder;
 import org.apache.jmeter.processor.gui.AbstractPostProcessorGui;
 import org.apache.jmeter.testelement.AbstractScopedTestElement;
 import org.apache.jmeter.testelement.TestElement;
@@ -41,37 +42,24 @@ import org.apache.jorphan.gui.JLabeledTe
 /**
  * Regular Expression Extractor Post-Processor GUI
  */
+@GUIMenuSortOrder(1)
 public class RegexExtractorGui extends AbstractPostProcessorGui {
     private static final long serialVersionUID = 240L;
 
     private JLabeledTextField regexField;
-
     private JLabeledTextField templateField;
-
     private JLabeledTextField defaultField;
-
     private JLabeledTextField matchNumberField;
-
     private JLabeledTextField refNameField;
-
     private JRadioButton useBody;
-
     private JRadioButton useUnescapedBody;
-
     private JRadioButton useBodyAsDocument;
-
     private JRadioButton useHeaders;
-
     private JRadioButton useRequestHeaders;
-
     private JRadioButton useURL;
-
     private JRadioButton useCode;
-
     private JRadioButton useMessage;
-
     private ButtonGroup group;
-    
     private JCheckBox emptyDefaultValue;
 
     public RegexExtractorGui() {

Modified: jmeter/trunk/src/components/org/apache/jmeter/extractor/json/jsonpath/gui/JSONPostProcessorGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/extractor/json/jsonpath/gui/JSONPostProcessorGui.java?rev=1818753&r1=1818752&r2=1818753&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/extractor/json/jsonpath/gui/JSONPostProcessorGui.java
(original)
+++ jmeter/trunk/src/components/org/apache/jmeter/extractor/json/jsonpath/gui/JSONPostProcessorGui.java
Wed Dec 20 08:56:03 2017
@@ -30,6 +30,7 @@ import javax.swing.JLabel;
 import javax.swing.JPanel;
 
 import org.apache.jmeter.extractor.json.jsonpath.JSONPostProcessor;
+import org.apache.jmeter.gui.GUIMenuSortOrder;
 import org.apache.jmeter.processor.gui.AbstractPostProcessorGui;
 import org.apache.jmeter.testelement.TestElement;
 import org.apache.jmeter.util.JMeterUtils;
@@ -39,6 +40,7 @@ import org.apache.jorphan.gui.JLabeledTe
  * GUI for {@link JSONPostProcessor}
  * @since 3.0
  */
+@GUIMenuSortOrder(3)
 public class JSONPostProcessorGui extends AbstractPostProcessorGui {
 
     private static final long serialVersionUID = -2845056031828291476L;

Modified: jmeter/trunk/src/components/org/apache/jmeter/sampler/DebugSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/sampler/DebugSampler.java?rev=1818753&r1=1818752&r2=1818753&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/sampler/DebugSampler.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/sampler/DebugSampler.java Wed Dec 20 08:56:03
2017
@@ -26,6 +26,7 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.jmeter.config.ConfigTestElement;
+import org.apache.jmeter.gui.GUIMenuSortOrder;
 import org.apache.jmeter.samplers.AbstractSampler;
 import org.apache.jmeter.samplers.Entry;
 import org.apache.jmeter.samplers.SampleResult;
@@ -36,8 +37,8 @@ import org.apache.jmeter.util.JMeterUtil
 
 /**
  * The Debug Sampler can be used to "sample" JMeter variables, JMeter properties and System
Properties.
- *
  */
+@GUIMenuSortOrder(2)
 public class DebugSampler extends AbstractSampler implements TestBean {
 
     private static final long serialVersionUID = 232L;
@@ -46,9 +47,7 @@ public class DebugSampler extends Abstra
             Arrays.asList("org.apache.jmeter.config.gui.SimpleConfigGui"));
 
     private boolean displayJMeterVariables;
-
     private boolean displayJMeterProperties;
-
     private boolean displaySystemProperties;
 
     @Override

Modified: jmeter/trunk/src/components/org/apache/jmeter/timers/gui/ConstantTimerGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/timers/gui/ConstantTimerGui.java?rev=1818753&r1=1818752&r2=1818753&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/timers/gui/ConstantTimerGui.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/timers/gui/ConstantTimerGui.java Wed Dec
20 08:56:03 2017
@@ -24,6 +24,7 @@ import javax.swing.JLabel;
 import javax.swing.JOptionPane;
 import javax.swing.JTextField;
 
+import org.apache.jmeter.gui.GUIMenuSortOrder;
 import org.apache.jmeter.testelement.TestElement;
 import org.apache.jmeter.timers.ConstantTimer;
 import org.apache.jmeter.util.JMeterUtils;
@@ -31,23 +32,16 @@ import org.apache.jorphan.gui.layout.Ver
 
 /**
  * The GUI for ConstantTimer.
- *
  */
+@GUIMenuSortOrder(1)
 public class ConstantTimerGui extends AbstractTimerGui {
     private static final long serialVersionUID = 240L;
 
-    /**
-     * The default value for the delay.
-     */
     private static final String DEFAULT_DELAY = "300";
-
     private static final String DELAY_FIELD = "Delay Field";
 
     private JTextField delayField;
 
-    /**
-     * No-arg constructor.
-     */
     public ConstantTimerGui() {
         init();
     }
@@ -55,10 +49,8 @@ public class ConstantTimerGui extends Ab
     /**
      * Handle an error.
      *
-     * @param e
-     *            the Exception that was thrown.
-     * @param thrower
-     *            the JComponent that threw the Exception.
+     * @param e       the Exception that was thrown.
+     * @param thrower the JComponent that threw the Exception.
      */
     public static void error(Exception e, JComponent thrower) {
         JOptionPane.showMessageDialog(thrower, e, "Error", JOptionPane.ERROR_MESSAGE);

Modified: jmeter/trunk/src/components/org/apache/jmeter/timers/gui/UniformRandomTimerGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/timers/gui/UniformRandomTimerGui.java?rev=1818753&r1=1818752&r2=1818753&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/timers/gui/UniformRandomTimerGui.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/timers/gui/UniformRandomTimerGui.java Wed
Dec 20 08:56:03 2017
@@ -18,73 +18,51 @@
 
 package org.apache.jmeter.timers.gui;
 
+import org.apache.jmeter.gui.GUIMenuSortOrder;
 import org.apache.jmeter.timers.RandomTimer;
 import org.apache.jmeter.timers.UniformRandomTimer;
 import org.apache.jmeter.util.JMeterUtils;
 
 /**
  * Implementation of a uniform random timer.
- *
  */
+@GUIMenuSortOrder(2)
 public class UniformRandomTimerGui extends AbstractRandomTimerGui {
 
     private static final long serialVersionUID = 240L;
 
     private static final String DEFAULT_DELAY = "0"; // $NON-NLS-1$
-
     private static final String DEFAULT_RANGE = "100.0";// $NON-NLS-1$
 
-    /**
-     * No-arg constructor.
-     */
     public UniformRandomTimerGui() {
         super();
     }
 
-
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public String getLabelResource() {
         return "uniform_timer_title";//$NON-NLS-1$
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     protected RandomTimer createRandomTimer() {
         return new UniformRandomTimer();
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     protected String getTimerDelayLabelKey() {
         return JMeterUtils.getResString("uniform_timer_delay"); //$NON-NLS-1$
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     protected String getTimerRangeLabelKey() {
         return JMeterUtils.getResString("uniform_timer_range"); //$NON-NLS-1$
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     protected String getDefaultDelay() {
         return DEFAULT_DELAY;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     protected String getDefaultRange() {
         return DEFAULT_RANGE;

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatVisualizer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatVisualizer.java?rev=1818753&r1=1818752&r2=1818753&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatVisualizer.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatVisualizer.java Wed Dec
20 08:56:03 2017
@@ -42,6 +42,7 @@ import javax.swing.Timer;
 import javax.swing.border.Border;
 import javax.swing.border.EmptyBorder;
 
+import org.apache.jmeter.gui.GUIMenuSortOrder;
 import org.apache.jmeter.gui.util.FileDialoger;
 import org.apache.jmeter.gui.util.HeaderAsPropertyRendererWrapper;
 import org.apache.jmeter.samplers.Clearable;
@@ -55,44 +56,34 @@ import org.apache.jorphan.gui.ObjectTabl
 import org.apache.jorphan.gui.RendererUtils;
 
 /**
- * Aggregrate Table-Based Reporting Visualizer for JMeter. Props to the people
- * who've done the other visualizers ahead of me (Stefano Mazzocchi), who I
- * borrowed code from to start me off (and much code may still exist). Thank
- * you!
- *
+ * Aggregrate Table-Based Reporting Visualizer for JMeter.
  */
+@GUIMenuSortOrder(3)
 public class StatVisualizer extends AbstractVisualizer implements Clearable, ActionListener
{
 
     private static final long serialVersionUID = 241L;
 
     private static final String USE_GROUP_NAME = "useGroupName"; //$NON-NLS-1$
-
     private static final String SAVE_HEADERS = "saveHeaders"; //$NON-NLS-1$
-
-    private final String TOTAL_ROW_LABEL = JMeterUtils
+    private static final String TOTAL_ROW_LABEL = JMeterUtils
             .getResString("aggregate_report_total_label"); //$NON-NLS-1$
+    private static final int REFRESH_PERIOD = JMeterUtils.getPropDefault("jmeter.gui.refresh_period",
500); // $NON-NLS-1$
 
     private JTable myJTable;
-
     private JScrollPane myScrollPane;
 
     private final JButton saveTable = new JButton(
             JMeterUtils.getResString("aggregate_graph_save_table")); //$NON-NLS-1$
 
-    // should header be saved with the data?
     private final JCheckBox saveHeaders = new JCheckBox(
             JMeterUtils.getResString("aggregate_graph_save_table_header"), true); //$NON-NLS-1$
 
     private final JCheckBox useGroupName = new JCheckBox(
             JMeterUtils.getResString("aggregate_graph_use_group_name")); //$NON-NLS-1$
 
-    private final int REFRESH_PERIOD = JMeterUtils.getPropDefault("jmeter.gui.refresh_period",
500); // $NON-NLS-1$
-
     private transient ObjectTableModel model;
 
-    /**
-     * Lock used to protect tableRows update + model update
-     */
+    /** Lock used to protect tableRows update + model update */
     private final transient Object lock = new Object();
 
     private final Map<String, SamplingStatCalculator> tableRows = new ConcurrentHashMap<>();
@@ -123,12 +114,14 @@ public class StatVisualizer extends Abst
 
     @Override
     public void add(final SampleResult res) {
-        SamplingStatCalculator row = tableRows.computeIfAbsent(res.getSampleLabel(useGroupName.isSelected()),
label -> {
-           SamplingStatCalculator newRow = new SamplingStatCalculator(label);
-           newRows.add(newRow);
-           return newRow;
-        });
-        synchronized(row) {
+        SamplingStatCalculator row = tableRows.computeIfAbsent(
+                res.getSampleLabel(useGroupName.isSelected()),
+                label -> {
+                    SamplingStatCalculator newRow = new SamplingStatCalculator(label);
+                    newRows.add(newRow);
+                    return newRow;
+                });
+        synchronized (row) {
             /*
              * Synch is needed because multiple threads can update the counts.
              */

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/SummaryReport.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/SummaryReport.java?rev=1818753&r1=1818752&r2=1818753&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/SummaryReport.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/SummaryReport.java Wed Dec 20
08:56:03 2017
@@ -45,6 +45,7 @@ import javax.swing.border.Border;
 import javax.swing.border.EmptyBorder;
 import javax.swing.table.TableCellRenderer;
 
+import org.apache.jmeter.gui.GUIMenuSortOrder;
 import org.apache.jmeter.gui.util.FileDialoger;
 import org.apache.jmeter.gui.util.HeaderAsPropertyRendererWrapper;
 import org.apache.jmeter.samplers.Clearable;
@@ -65,6 +66,7 @@ import org.apache.jorphan.reflect.Functo
  * Simpler (lower memory) version of Aggregate Report (StatVisualizer).
  * Excludes the Median and 90% columns, which are expensive in memory terms
  */
+@GUIMenuSortOrder(2)
 public class SummaryReport extends AbstractVisualizer implements Clearable, ActionListener
{
 
     private static final long serialVersionUID = 241L;

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java?rev=1818753&r1=1818752&r2=1818753&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java
(original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java
Wed Dec 20 08:56:03 2017
@@ -70,6 +70,7 @@ import org.apache.commons.collections.bu
 import org.apache.commons.lang3.StringUtils;
 import org.apache.jmeter.JMeter;
 import org.apache.jmeter.assertions.AssertionResult;
+import org.apache.jmeter.gui.GUIMenuSortOrder;
 import org.apache.jmeter.gui.util.VerticalPanel;
 import org.apache.jmeter.samplers.Clearable;
 import org.apache.jmeter.samplers.SampleResult;
@@ -80,8 +81,8 @@ import org.slf4j.LoggerFactory;
 
 /**
  * Base for ViewResults
- *
  */
+@GUIMenuSortOrder(1)
 public class ViewResultsFullVisualizer extends AbstractVisualizer
 implements ActionListener, TreeSelectionListener, Clearable, ItemListener {
 
@@ -90,34 +91,24 @@ implements ActionListener, TreeSelection
     private static final Logger log = LoggerFactory.getLogger(ViewResultsFullVisualizer.class);
 
     public static final Color SERVER_ERROR_COLOR = Color.red;
-
     public static final Color CLIENT_ERROR_COLOR = Color.blue;
-
     public static final Color REDIRECT_COLOR = Color.green;
-    
-    private static final Border RED_BORDER = BorderFactory.createLineBorder(Color.red);
-    
-    private static final Border BLUE_BORDER = BorderFactory.createLineBorder(Color.blue);
-
-    private  JSplitPane mainSplit;
-
-    private DefaultMutableTreeNode root;
-
-    private DefaultTreeModel treeModel;
 
-    private JTree jTree;
-
-    private Component leftSide;
-
-    private JTabbedPane rightSide;
+    protected static final String COMBO_CHANGE_COMMAND = "change_combo"; // $NON-NLS-1$
 
-    private JComboBox<ResultRenderer> selectRenderPanel;
+    private static final Border RED_BORDER = BorderFactory.createLineBorder(Color.red);
+    private static final Border BLUE_BORDER = BorderFactory.createLineBorder(Color.blue);
+    private static final String ICON_SIZE = JMeterUtils.getPropDefault(JMeter.TREE_ICON_SIZE,
JMeter.DEFAULT_TREE_ICON_SIZE);
 
-    private int selectedTab;
+    // Default limited to 10 megabytes
+    private static final int MAX_DISPLAY_SIZE =
+            JMeterUtils.getPropDefault("view.results.tree.max_size", 10485760); // $NON-NLS-1$
 
-    protected static final String COMBO_CHANGE_COMMAND = "change_combo"; // $NON-NLS-1$
+    // default display order
+    private static final String VIEWERS_ORDER =
+            JMeterUtils.getPropDefault("view.results.tree.renderers_order", ""); // $NON-NLS-1$
//$NON-NLS-2$
 
-    private static final String ICON_SIZE = JMeterUtils.getPropDefault(JMeter.TREE_ICON_SIZE,
JMeter.DEFAULT_TREE_ICON_SIZE);
+    private static final int REFRESH_PERIOD = JMeterUtils.getPropDefault("jmeter.gui.refresh_period",
500);
 
     private static final ImageIcon imageSuccess = JMeterUtils.getImage(
             JMeterUtils.getPropDefault("viewResultsTree.success",  //$NON-NLS-1$
@@ -127,26 +118,19 @@ implements ActionListener, TreeSelection
             JMeterUtils.getPropDefault("viewResultsTree.failure",  //$NON-NLS-1$
                     "vrt/" + ICON_SIZE + "/security-low-2.png")); //$NON-NLS-1$ $NON-NLS-2$
 
-    // Maximum size that we will display
-    // Default limited to 10 megabytes
-    private static final int MAX_DISPLAY_SIZE =
-        JMeterUtils.getPropDefault("view.results.tree.max_size", 10485760); // $NON-NLS-1$
-
-    // default display order
-    private static final String VIEWERS_ORDER =
-        JMeterUtils.getPropDefault("view.results.tree.renderers_order", ""); // $NON-NLS-1$
//$NON-NLS-2$
-
-    private static final int REFRESH_PERIOD = JMeterUtils.getPropDefault("jmeter.gui.refresh_period",
500);
-
+    private JSplitPane mainSplit;
+    private DefaultMutableTreeNode root;
+    private DefaultTreeModel treeModel;
+    private JTree jTree;
+    private Component leftSide;
+    private JTabbedPane rightSide;
+    private JComboBox<ResultRenderer> selectRenderPanel;
+    private int selectedTab;
     private ResultRenderer resultsRender = null;
     private Object resultsObject = null;
-
     private TreeSelectionEvent lastSelectionEvent;
-
     private JCheckBox autoScrollCB;
-
     private Buffer buffer;
-
     private boolean dataChanged;
 
     /**



Mime
View raw message