[hg] main-silver: @Override annotations added and other warnings...

  • From:
  • To:
  • Subject: [hg] main-silver: @Override annotations added and other warnings...
  • Date: Tue, 11 Dec 2012 06:43:26 -0800

changeset 22bd58609e4b in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/22bd58609e4b
description:
        @Override annotations added and other warnings eliminated.

diffstat:

 
spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/DebugMainProjectAction.java
 |  40 +++++----
 1 files changed, 21 insertions(+), 19 deletions(-)

diffs (143 lines):

diff --git 
a/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/DebugMainProjectAction.java
 
b/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/DebugMainProjectAction.java
--- 
a/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/DebugMainProjectAction.java
+++ 
b/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/actions/DebugMainProjectAction.java
@@ -99,37 +99,37 @@
         attachHistorySupport = new AttachHistorySupport();
     }
     
-    public Object getValue(String arg0) {
+    @Override public Object getValue(String arg0) {
         return delegate.getValue(arg0);
     }
 
-    public void putValue(String arg0, Object arg1) {
+    @Override public void putValue(String arg0, Object arg1) {
         delegate.putValue(arg0, arg1);
     }
 
-    public void setEnabled(boolean arg0) {
+    @Override public void setEnabled(boolean arg0) {
         delegate.setEnabled(arg0);
     }
 
-    public boolean isEnabled() {
+    @Override public boolean isEnabled() {
         return delegate.isEnabled();
     }
 
-    public void addPropertyChangeListener(PropertyChangeListener arg0) {
+    @Override public void addPropertyChangeListener(PropertyChangeListener 
arg0) {
         delegate.addPropertyChangeListener(arg0);
     }
 
-    public void removePropertyChangeListener(PropertyChangeListener arg0) {
+    @Override public void 
removePropertyChangeListener(PropertyChangeListener arg0) {
         delegate.removePropertyChangeListener(arg0);
     }
 
-    public void actionPerformed(ActionEvent arg0) {
+    @Override public void actionPerformed(ActionEvent arg0) {
         Project p = OpenProjects.getDefault().getMainProject();
         GestureSubmitter.logDebugProject(p);
         delegate.actionPerformed(arg0);
     }
 
-    public Component getToolbarPresenter() {
+    @Override public Component getToolbarPresenter() {
         JPopupMenu menu = new JPopupMenu();
         JButton button = DropDownButtonFactory.createDropDownButton(
                 new ImageIcon(new BufferedImage(16, 16, 
BufferedImage.TYPE_INT_ARGB)), menu);
@@ -137,7 +137,7 @@
         item.setEnabled(delegate.isEnabled());
 
         delegate.addPropertyChangeListener(new PropertyChangeListener() {
-            public void propertyChange(PropertyChangeEvent evt) {
+            @Override public void propertyChange(PropertyChangeEvent evt) {
                 String propName = evt.getPropertyName();
                 if ("enabled".equals(propName)) {
                     item.setEnabled((Boolean)evt.getNewValue());
@@ -149,7 +149,7 @@
 
         menu.add(item);
         item.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
+            @Override public void actionPerformed(ActionEvent e) {
                 DebugMainProjectAction.this.actionPerformed(e);
             }
         });
@@ -169,7 +169,7 @@
     }
 
     static synchronized void attachHistoryChanged() {
-        if (ahs == null) return;
+        if (ahs == null) { return; }
         for (AttachHistorySupport support : ahs) {
             support.computeItems();
         }
@@ -184,16 +184,16 @@
 
     // PopupMenuListener 
........................................................
 
-    public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
+    @Override public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
         JPopupMenu menu = (JPopupMenu)e.getSource();
         attachHistorySupport.init(menu);
         menu.removePopupMenuListener(this);
     }
 
-    public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
+    @Override public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
     }
 
-    public void popupMenuCanceled(PopupMenuEvent e) {
+    @Override public void popupMenuCanceled(PopupMenuEvent e) {
     }
 
     // AttachHistorySupport 
.....................................................
@@ -229,7 +229,7 @@
             } // for
         }
 
-        public void actionPerformed(ActionEvent e) {
+        @Override public void actionPerformed(ActionEvent e) {
             JMenuItem item = (JMenuItem)e.getSource();
             int index = -1;
             for (int x = 0; x < items.length; x++) {
@@ -238,7 +238,7 @@
                     break;
                 }
             }
-            if (index == -1) return; // should not occure
+            if (index == -1) { return; } // should not occure
             Properties props = 
Properties.getDefault().getProperties("debugger").getProperties("last_attaches");
             Integer[] usedSlots = (Integer[]) props.getArray("used_slots", 
new Integer[0]);
             String attachTypeName = props.getProperties("slot_" + 
usedSlots[index]).getString("attach_type", "???");
@@ -264,7 +264,7 @@
                 } catch (NoSuchMethodException ex) {
                 } catch (SecurityException ex) {
                 }
-                if (loadMethod == null) return;
+                if (loadMethod == null) { return; }
                 try {
                     Boolean result = (Boolean)loadMethod.invoke(controller, 
props.getProperties("slot_" + usedSlots[index]).getProperties("values"));
                     if (!result) {
@@ -279,7 +279,7 @@
                     makeFirst(index);
                     GestureSubmitter.logAttach(attachTypeName);
                 }
-                return;
+                //return;
             } else {
                 // report failure - attach type not found
                 
StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(DebugMainProjectAction.class,
 "CTL_Attach_Type_Not_Found"));
@@ -287,7 +287,9 @@
         }
 
         private void makeFirst(int index) {
-            if (index == 0) return; // nothing to do
+            if (index == 0) {
+                return;  // nothing to do
+            }
             Properties props = 
Properties.getDefault().getProperties("debugger").getProperties("last_attaches");
             Integer[] usedSlots = (Integer[]) props.getArray("used_slots", 
new Integer[0]);
             int temp = usedSlots[index];

[hg] main-silver: @Override annotations added and other warnings...

mentlicher 12/11/2012

Project Features

About this Project

Debugger was started in November 2009, is owned by tpavek, and has 29 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close