jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1204149 - in /jmeter/trunk/src/core/org/apache/jmeter/gui: MainFrame.java util/JMeterMenuBar.java
Date Sun, 20 Nov 2011 11:42:08 GMT
Author: pmouawad
Date: Sun Nov 20 11:42:07 2011
New Revision: 1204149

URL: http://svn.apache.org/viewvc?rev=1204149&view=rev
Log:
edit_remove is never initialized and not used.

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java?rev=1204149&r1=1204148&r2=1204149&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java Sun Nov 20 11:42:07 2011
@@ -251,16 +251,6 @@ public class MainFrame extends JFrame im
     }
 
     /**
-     * Specify whether or not the Edit|Remove menu item should be enabled.
-     *
-     * @param enabled
-     *            true if the menu item should be enabled, false otherwise
-     */
-    public void setEditRemoveEnabled(boolean enabled) {
-        menuBar.setEditRemoveEnabled(enabled);
-    }
-
-    /**
      * Close the currently selected menu.
      */
     public void closeMenu() {

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java?rev=1204149&r1=1204148&r2=1204149&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java Sun Nov 20 11:42:07
2011
@@ -78,9 +78,6 @@ public class JMeterMenuBar extends JMenu
 
     private JMenu edit_add;
 
-    // JMenu edit_add_submenu;
-    private JMenuItem edit_remove; // TODO - should this be created?
-
     private JMenu runMenu;
 
     private JMenuItem run_start;
@@ -222,37 +219,7 @@ public class JMeterMenuBar extends JMenu
         // If we are enabling the Edit-->Add menu item, then we also need to
         // enable the Edit menu. The Edit menu may already be enabled, but
         // there's no harm it trying to enable it again.
-        if (enabled) {
-            setEditEnabled(true);
-        } else {
-            // If we are disabling the Edit-->Add menu item and the
-            // Edit-->Remove menu item is disabled, then we also need to
-            // disable the Edit menu.
-            // The Java Look and Feel Guidelines say to disable a menu if all
-            // menu items are disabled.
-            if (!edit_remove.isEnabled()) {
-                editMenu.setEnabled(false);
-            }
-        }
-    }
-
-    public void setEditRemoveEnabled(boolean enabled) {
-        edit_remove.setEnabled(enabled);
-        // If we are enabling the Edit-->Remove menu item, then we also need to
-        // enable the Edit menu. The Edit menu may already be enabled, but
-        // there's no harm it trying to enable it again.
-        if (enabled) {
-            setEditEnabled(true);
-        } else {
-            // If we are disabling the Edit-->Remove menu item and the
-            // Edit-->Add menu item is disabled, then we also need to disable
-            // the Edit menu.
-            // The Java Look and Feel Guidelines say to disable a menu if all
-            // menu items are disabled.
-            if (!edit_add.isEnabled()) {
-                editMenu.setEnabled(false);
-            }
-        }
+        setEditEnabled(enabled);
     }
 
     /**



Mime
View raw message