[hg] main-silver: Fixing typos and adding @Override annotations.

  • From:
  • To:
  • Subject: [hg] main-silver: Fixing typos and adding @Override annotations.
  • Date: Fri, 26 Apr 2013 21:48:04 -0700

changeset bca46781fe86 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/bca46781fe86
description:
        Fixing typos and adding @Override annotations.

diffstat:

 
debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/FixedWatchesManager.java
                |  37 ++++++++-
 
debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/BreakpointsTreeModelFilter.java
  |  14 ++-
 
debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/HiddenCallStackFramesFilter.java
 |   2 +-
 spi.viewmodel/src/org/netbeans/spi/viewmodel/TreeModelFilter.java            
                      |   2 +-
 4 files changed, 43 insertions(+), 12 deletions(-)

diffs (310 lines):

diff --git 
a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/FixedWatchesManager.java
 
b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/FixedWatchesManager.java
--- 
a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/FixedWatchesManager.java
+++ 
b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/FixedWatchesManager.java
@@ -100,12 +100,13 @@
     public static final String FIXED_WATCH =
         
"org/netbeans/modules/debugger/resources/watchesView/watch_type3_16.png";
     private final Action DELETE_ACTION = Models.createAction (
-        NbBundle.getBundle (FixedWatchesManager.class).getString 
-            ("CTL_DeleteFixedWatch_Label"),
+        NbBundle.getMessage(FixedWatchesManager.class, 
"CTL_DeleteFixedWatch_Label"),
         new Models.ActionPerformer () {
+            @Override
             public boolean isEnabled (Object node) {
                 return !WatchesNodeModelFilter.isEmptyWatch(node);
             }
+            @Override
             public void perform (Object[] nodes) {
                 int i, k = nodes.length;
                 for (i = 0; i < k; i++)
@@ -125,12 +126,13 @@
         );
     };
     private final Action CREATE_FIXED_WATCH_ACTION = Models.createAction (
-        NbBundle.getBundle (FixedWatchesManager.class).getString 
-            ("CTL_CreateFixedWatch_Label"),
+        NbBundle.getMessage(FixedWatchesManager.class, 
"CTL_CreateFixedWatch_Label"),
         new Models.ActionPerformer () {
+            @Override
             public boolean isEnabled (Object node) {
                 return !WatchesNodeModelFilter.isEmptyWatch(node) && 
!isPrimitive(node);
             }
+            @Override
             public void perform (Object[] nodes) {
                 int i, k = nodes.length;
                 for (i = 0; i < k; i++)
@@ -182,10 +184,12 @@
 
     // TreeModelFilter 
.........................................................
     
+    @Override
     public Object getRoot (TreeModel original) {
         return original.getRoot ();
     }
 
+    @Override
     public Object[] getChildren (
         TreeModel original, 
         Object parent, 
@@ -193,7 +197,7 @@
         int to
     ) throws UnknownTypeException {
         if (parent == TreeModel.ROOT) {
-            if (fixedWatches.size () == 0) 
+            if (fixedWatches.isEmpty()) 
                 return original.getChildren (parent, from, to);
 
             int fixedSize = fixedWatches.size ();
@@ -234,6 +238,7 @@
         return original.getChildren (parent, from, to);
     }
 
+    @Override
     public int getChildrenCount (
         TreeModel original, 
         Object parent
@@ -248,11 +253,13 @@
         return original.getChildrenCount (parent);
     }
 
+    @Override
     public boolean isLeaf (TreeModel original, Object node) 
     throws UnknownTypeException {
         return original.isLeaf (node);
     }
 
+    @Override
     public synchronized void addModelListener (ModelListener l) {
         if (listeners == null) {
             listeners = new HashSet();
@@ -260,6 +267,7 @@
         listeners.add(l);
     }
 
+    @Override
     public synchronized void removeModelListener (ModelListener l) {
         if (listeners == null) return;
         listeners.remove (l);
@@ -268,6 +276,7 @@
     
     // NodeActionsProviderFilter 
...............................................
 
+    @Override
     public void performDefaultAction (
         NodeActionsProvider original, 
         Object node
@@ -278,6 +287,7 @@
         original.performDefaultAction (node);
     }
 
+    @Override
     public Action[] getActions (NodeActionsProvider original, Object node) 
     throws UnknownTypeException {
         Action [] actions = original.getActions (node);
@@ -329,6 +339,7 @@
     
     // NodeModel 
...............................................................
     
+    @Override
     public String getDisplayName (NodeModel original, Object node) 
     throws UnknownTypeException {
         KeyWrapper wrapper = new KeyWrapper(node);
@@ -337,11 +348,13 @@
         return original.getDisplayName (node);
     }
     
+    @Override
     public String getShortDescription (NodeModel original, Object node) 
     throws UnknownTypeException {
         return original.getShortDescription (node);
     }
     
+    @Override
     public String getIconBase (NodeModel original, Object node) 
     throws UnknownTypeException {
         return original.getIconBase (node);
@@ -356,7 +369,7 @@
             addFixedWatch (jw.getExpression (), jw);
         } else {
             Variable variable = (Variable) node;
-            String name = null;
+            String name;
             if (variable instanceof LocalVariable) {
                 name = ((LocalVariable) variable).getName ();
             } else if (variable instanceof Field) {
@@ -391,6 +404,7 @@
                 ModelEvent.NodeChanged.CHILDREN_MASK));
         // Open the watches view, where the fixed watch was added:
         SwingUtilities.invokeLater(new Runnable() {
+            @Override
             public void run() {
                 TopComponent watchesView = 
WindowManager.getDefault().findTopComponent("watchesView"); // NOI18N
                 if (watchesView != null && watchesView.isOpened()) {
@@ -422,6 +436,7 @@
         }
     }
 
+    @Override
     public boolean canRename(ExtendedNodeModel original, Object node) throws 
UnknownTypeException {
         if (fixedWatches.containsKey (new KeyWrapper(node))) {
             return false;
@@ -429,40 +444,49 @@
         return original.canRename(node);
     }
 
+    @Override
     public boolean canCopy(ExtendedNodeModel original, Object node) throws 
UnknownTypeException {
         return original.canCopy(node);
     }
 
+    @Override
     public boolean canCut(ExtendedNodeModel original, Object node) throws 
UnknownTypeException {
         return original.canCut(node);
     }
 
+    @Override
     public Transferable clipboardCopy(ExtendedNodeModel original, Object 
node) throws IOException, UnknownTypeException {
         return original.clipboardCopy(node);
     }
 
+    @Override
     public Transferable clipboardCut(ExtendedNodeModel original, Object 
node) throws IOException, UnknownTypeException {
         return original.clipboardCut(node);
     }
 
+    @Override
     public PasteType[] getPasteTypes(ExtendedNodeModel original, Object 
node, Transferable t) throws UnknownTypeException {
         return original.getPasteTypes(node, t);
     }
 
+    @Override
     public void setName(ExtendedNodeModel original, Object node, String 
name) throws UnknownTypeException {
         original.setName(node, name);
     }
 
+    @Override
     public String getIconBaseWithExtension(ExtendedNodeModel original, 
Object node) throws UnknownTypeException {
         if (fixedWatches.containsKey (new KeyWrapper(node)))
             return FIXED_WATCH;
         return original.getIconBaseWithExtension (node);
     }
 
+    @Override
     public Object getValueAt(TableModel original, Object node, String 
columnID) throws UnknownTypeException {
         return original.getValueAt(node, columnID);
     }
 
+    @Override
     public boolean isReadOnly(TableModel original, Object node, String 
columnID) throws UnknownTypeException {
         if (fixedWatches.containsKey(new KeyWrapper(node))) {
             return true;
@@ -471,6 +495,7 @@
         }
     }
 
+    @Override
     public void setValueAt(TableModel original, Object node, String 
columnID, Object value) throws UnknownTypeException {
         original.setValueAt(node, columnID, value);
     }
diff --git 
a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/BreakpointsTreeModelFilter.java
 
b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/BreakpointsTreeModelFilter.java
--- 
a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/BreakpointsTreeModelFilter.java
+++ 
b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/BreakpointsTreeModelFilter.java
@@ -84,6 +84,7 @@
      * @param   original the original tree model
      * @return  filtered root of hierarchy
      */
+    @Override
     public Object getRoot (TreeModel original) {
         return original.getRoot ();
     }
@@ -98,10 +99,11 @@
      * @throws  ComputingException if the children resolving process 
      *          is time consuming, and will be performed off-line 
      * @throws  UnknownTypeException if this TreeModelFilter implementation 
is not
-     *          able to resolve dchildren for given node type
+     *          able to resolve children for given node type
      *
      * @return  children for given parent on given indexes
      */
+    @Override
     public Object[] getChildren (
         TreeModel   original, 
         Object      parent, 
@@ -109,7 +111,7 @@
         int         to
     ) throws UnknownTypeException {
         if (to - from <= 0) {
-            logger.fine("getChildren("+from+", "+to+"): RETURNING an empty 
array.");
+            logger.log(Level.FINE, "getChildren({0}, {1}): RETURNING an 
empty array.", new Object[]{from, to});
             return new Object[0];
         }
         Object[] ch = original.getChildren (parent, from, to);
@@ -150,7 +152,7 @@
     }
     
     /**
-     * Returns number of filterred children for given node.
+     * Returns number of filtered children for given node.
      * 
      * @param   original the original tree model
      * @param   node the parent node
@@ -163,6 +165,7 @@
      *
      * @return  true if node is leaf
      */
+    @Override
     public int getChildrenCount (
         TreeModel original,
         Object node
@@ -175,9 +178,10 @@
      * 
      * @param   original the original tree model
      * @throws  UnknownTypeException if this TreeModel implementation is not
-     *          able to resolve dchildren for given node type
+     *          able to resolve children for given node type
      * @return  true if node is leaf
      */
+    @Override
     public boolean isLeaf (
         TreeModel original, 
         Object node
@@ -190,6 +194,7 @@
      * 
      * @param l the listener to add
      */
+    @Override
     public void addModelListener (ModelListener l) {
     }
 
@@ -198,6 +203,7 @@
      *
      * @param l the listener to remove
      */
+    @Override
     public void removeModelListener (ModelListener l) {
     }
 }
diff --git 
a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/HiddenCallStackFramesFilter.java
 
b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/HiddenCallStackFramesFilter.java
--- 
a/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/HiddenCallStackFramesFilter.java
+++ 
b/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/HiddenCallStackFramesFilter.java
@@ -168,7 +168,7 @@
     }
     
     /**
-     * Returns number of filterred children for given node.
+     * Returns number of filtered children for given node.
      * 
      * @param   original the original tree model
      * @param   node the parent node
diff --git 
a/spi.viewmodel/src/org/netbeans/spi/viewmodel/TreeModelFilter.java 
b/spi.viewmodel/src/org/netbeans/spi/viewmodel/TreeModelFilter.java
--- a/spi.viewmodel/src/org/netbeans/spi/viewmodel/TreeModelFilter.java
+++ b/spi.viewmodel/src/org/netbeans/spi/viewmodel/TreeModelFilter.java
@@ -85,7 +85,7 @@
     ) throws UnknownTypeException;
     
     /**
-     * Returns number of filterred children for given node.
+     * Returns number of filtered children for given node.
      * 
      * @param   original the original tree model
      * @param   node the parent node

[hg] main-silver: Fixing typos and adding @Override annotations.

mentlicher 04/27/2013

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