Author: sebb
Date: Fri Sep 28 09:26:47 2007
New Revision: 580405

URL: http://svn.apache.org/viewvc?rev=580405&view=rev
Log:
Re-order menu items to be more like the processing order

Modified:
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/gui/TestPlanGui.java
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java
    
jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/ThreadGroupGui.java

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/gui/TestPlanGui.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/gui/TestPlanGui.java?rev=580405&r1=580404&r2=580405&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/gui/TestPlanGui.java 
(original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/gui/TestPlanGui.java 
Fri Sep 28 09:26:47 2007
@@ -85,12 +85,12 @@
                JMenu addMenu = new JMenu(JMeterUtils.getResString("add")); // 
$NON-NLS-1$
                addMenu.add(MenuFactory.makeMenuItem(new 
ThreadGroupGui().getStaticLabel(), ThreadGroupGui.class.getName(),
                                ActionNames.ADD));
-               addMenu.add(MenuFactory.makeMenu(MenuFactory.LISTENERS, 
ActionNames.ADD));
                addMenu.add(MenuFactory.makeMenu(MenuFactory.CONFIG_ELEMENTS, 
ActionNames.ADD));
-               addMenu.add(MenuFactory.makeMenu(MenuFactory.ASSERTIONS, 
ActionNames.ADD));
+               addMenu.add(MenuFactory.makeMenu(MenuFactory.TIMERS, 
ActionNames.ADD));
                addMenu.add(MenuFactory.makeMenu(MenuFactory.PRE_PROCESSORS, 
ActionNames.ADD));
+               addMenu.add(MenuFactory.makeMenu(MenuFactory.ASSERTIONS, 
ActionNames.ADD));
                addMenu.add(MenuFactory.makeMenu(MenuFactory.POST_PROCESSORS, 
ActionNames.ADD));
-               addMenu.add(MenuFactory.makeMenu(MenuFactory.TIMERS, 
ActionNames.ADD));
+               addMenu.add(MenuFactory.makeMenu(MenuFactory.LISTENERS, 
ActionNames.ADD));
                pop.add(addMenu);
                MenuFactory.addFileMenu(pop);
                return pop;

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java?rev=580405&r1=580404&r2=580405&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java 
Fri Sep 28 09:26:47 2007
@@ -83,24 +83,26 @@
        // MENU_PARENT_xxx - controls which items are in the Insert Parent menu
        private static final String[] MENU_ADD_CONTROLLER = new String[] {
         MenuFactory.CONTROLLERS, 
-        MenuFactory.SAMPLERS,
-               MenuFactory.ASSERTIONS, 
                MenuFactory.CONFIG_ELEMENTS, 
         MenuFactory.TIMERS, 
-        MenuFactory.LISTENERS, 
         MenuFactory.PRE_PROCESSORS,
-               MenuFactory.POST_PROCESSORS };
+        MenuFactory.SAMPLERS,
+               MenuFactory.ASSERTIONS, 
+               MenuFactory.POST_PROCESSORS,
+        MenuFactory.LISTENERS, 
+               };
 
        private static final String[] MENU_PARENT_CONTROLLER = new String[] { 
         MenuFactory.CONTROLLERS };
 
        private static final String[] MENU_ADD_SAMPLER = new String[] { 
         MenuFactory.CONFIG_ELEMENTS,
-               MenuFactory.ASSERTIONS, 
                MenuFactory.TIMERS, 
-               MenuFactory.LISTENERS, 
         MenuFactory.PRE_PROCESSORS,
-               MenuFactory.POST_PROCESSORS };
+               MenuFactory.ASSERTIONS, 
+               MenuFactory.POST_PROCESSORS,
+               MenuFactory.LISTENERS, 
+               };
 
        private static final String[] MENU_PARENT_SAMPLER = new String[] { 
         MenuFactory.CONTROLLERS };
@@ -271,23 +273,25 @@
        }
 
        /**
+        * Create a menu from a menu category.
         * 
         * @param category - predefined string (used as key for menuMap HashMap 
and messages.properties lookup)
         * @param actionCommand - predefined string, e.g. ActionNames.ADD
         *     @see org.apache.jmeter.gui.action.ActionNames
-        * @return
+        * @return the menu
         */
        public static JMenu makeMenu(String category, String actionCommand) {
                return makeMenu((Collection) menuMap.get(category), 
actionCommand, JMeterUtils.getResString(category));
        }
 
        /**
+        * Create a menu from a collection of items.
         * 
         * @param menuInfo - collection of MenuInfo items
         * @param actionCommand - predefined string, e.g. ActionNames.ADD
         *     @see org.apache.jmeter.gui.action.ActionNames
         * @param menuName
-        * @return
+        * @return the menu
         */
        public static JMenu makeMenu(Collection menuInfo, String actionCommand, 
String menuName) {
                Iterator iter = menuInfo.iterator();
@@ -306,12 +310,13 @@
        }
 
        /**
+        * Create a single menu item
         * 
         * @param label for the MenuItem
         * @param name for the MenuItem
         * @param actionCommand - predefined string, e.g. ActionNames.ADD
         *     @see org.apache.jmeter.gui.action.ActionNames
-        * @return
+        * @return the menu item
         */
        public static JMenuItem makeMenuItem(String label, String name, String 
actionCommand) {
                JMenuItem newMenuChoice = new JMenuItem(label);

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/ThreadGroupGui.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/ThreadGroupGui.java?rev=580405&r1=580404&r2=580405&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/ThreadGroupGui.java 
(original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/ThreadGroupGui.java 
Fri Sep 28 09:26:47 2007
@@ -176,13 +176,14 @@
                JPopupMenu pop = new JPopupMenu();
                pop.add(MenuFactory.makeMenus(new String[] { 
                                MenuFactory.CONTROLLERS, 
-                               MenuFactory.LISTENERS,
-                               MenuFactory.SAMPLERS, 
-                               MenuFactory.ASSERTIONS,
-                               MenuFactory.TIMERS, 
                                MenuFactory.CONFIG_ELEMENTS, 
+                               MenuFactory.TIMERS, 
                                MenuFactory.PRE_PROCESSORS,
-                               MenuFactory.POST_PROCESSORS }, 
+                               MenuFactory.SAMPLERS, 
+                               MenuFactory.ASSERTIONS,
+                               MenuFactory.POST_PROCESSORS,
+                               MenuFactory.LISTENERS,
+                               }, 
                                JMeterUtils.getResString("add"), // $NON-NLS-1$
                                ActionNames.ADD));
                MenuFactory.addEditMenu(pop, true);



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to