[hg] main-silver: Warnings elimination: @Override, brackets, gen...

  • From:
  • To:
  • Subject: [hg] main-silver: Warnings elimination: @Override, brackets, gen...
  • Date: Wed, 13 Feb 2013 11:12:49 -0800

changeset dd336a09a46f in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/dd336a09a46f
description:
        Warnings elimination: @Override, brackets, generification.

diffstat:

 
debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/AST2Bytecode.java
                 |   12 +-
 
debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/BreakpointAnnotationProvider.java
 |   53 +++-
 
debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/BreakpointsActionsProvider.java
   |   66 +++--
 
debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ClassScanner.java
                 |    6 +-
 
debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/DebuggerAnnotation.java
           |    9 +-
 
debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/DebuggerBreakpointAnnotation.java
 |   81 +++---
 
debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/EditorContextImpl.java
            |    7 +-
 
debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ExpressionScanner.java
            |   72 +++--
 
debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/FixActionProvider.java
            |   44 ++-
 
debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/HighlightsLayerFactoryImpl.java
   |    1 +
 
debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/LineTranslations.java
             |   45 ++-
 
debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/MainProjectManager.java
           |    7 +-
 
debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcePathProviderImpl.java
       |   30 +-
 
debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcesCurrentModel.java
          |  114 ++++++---
 
debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcesNodeModel.java
             |    1 -
 
debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcesRemoteModel.java
           |  108 +++++---
 
debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcesTabs.java
                  |    1 +
 
debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/StepIntoActionProvider.java
       |   35 ++-
 
debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ToolTipAnnotation.java
            |  103 ++++++--
 
debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ToolTipNodeModelFilter.java
       |    1 -
 
debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ToolTipView.java
                  |    7 +-
 21 files changed, 517 insertions(+), 286 deletions(-)

diffs (2514 lines):

diff --git 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/AST2Bytecode.java
 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/AST2Bytecode.java
--- 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/AST2Bytecode.java
+++ 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/AST2Bytecode.java
@@ -97,8 +97,12 @@
         Types types = ci.getTypes();
         SourcePositions sp = trees.getSourcePositions();
         //List<Tree> treeNodes = linearizeTree(expTrees);
-        if (treeNodes == null) return null;
-        if (indexes == null) return null;
+        if (treeNodes == null) {
+            return null;
+        }
+        if (indexes == null) {
+            return null;
+        }
         int length = treeNodes.size();
         List<EditorContext.Operation> operations = new 
ArrayList<EditorContext.Operation>(length);
         LineMap lineMap = cu.getLineMap();
@@ -153,7 +157,7 @@
                                 methodNameInBytecode = 
constantPool.getMethodName(constantPoolIndex);
                                 methodDescriptorInBytecode = 
constantPool.getMethodDescriptor(constantPoolIndex);
                             } catch (IndexOutOfBoundsException ioobex) {
-                                ioobex = Exceptions.attachMessage(ioobex, 
"While matching "+java.util.Arrays.asList(treeNodes)+". Please attach the 
code where this happens to 
http://www.netbeans.org/issues/show_bug.cgi?id=161839";);
+                                ioobex = Exceptions.attachMessage(ioobex, 
"While matching "+treeNodes+". Please attach the code where this happens to 
http://www.netbeans.org/issues/show_bug.cgi?id=161839";);
                                 Exceptions.printStackTrace(ioobex);
                             }
                         }
@@ -272,7 +276,7 @@
                                             methodNameInBytecode = 
constantPool.getMethodName(constantPoolIndex);
                                             methodDescriptorInBytecode = 
constantPool.getMethodDescriptor(constantPoolIndex);
                                         } catch (IndexOutOfBoundsException 
ioobex) {
-                                            ioobex = 
Exceptions.attachMessage(ioobex, "While matching 
"+java.util.Arrays.asList(treeNodes)+". Please attach the code where this 
happens to http://www.netbeans.org/issues/show_bug.cgi?id=161839";);
+                                            ioobex = 
Exceptions.attachMessage(ioobex, "While matching "+treeNodes+". Please attach 
the code where this happens to 
http://www.netbeans.org/issues/show_bug.cgi?id=161839";);
                                             
Exceptions.printStackTrace(ioobex);
                                             break;
                                         }
diff --git 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/BreakpointAnnotationProvider.java
 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/BreakpointAnnotationProvider.java
--- 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/BreakpointAnnotationProvider.java
+++ 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/BreakpointAnnotationProvider.java
@@ -75,7 +75,6 @@
 
 import org.openide.cookies.LineCookie;
 import org.openide.filesystems.FileObject;
-import org.openide.filesystems.FileStateInvalidException;
 import org.openide.loaders.DataObject;
 import org.openide.loaders.DataObjectNotFoundException;
 import org.openide.text.Annotation;
@@ -89,8 +88,8 @@
 
 
 /**
- * This class is called when some file in editor is openend. It changes if
- * some LineBreakpoints with annotations should be readed.
+ * This class is called when some file in editor is opened. It changes if
+ * some LineBreakpoints with annotations should be read.
  *
  * @author Jan Jancura, Martin Entlicher
  */
@@ -106,6 +105,7 @@
     private RequestProcessor annotationProcessor = new 
RequestProcessor("Annotation Refresh", 1);
     private RequestProcessor contextWaitingProcessor = new 
RequestProcessor("Annotation Refresh Context Waiting", 1);
 
+    @Override
     public void annotate (Line.Set set, Lookup lookup) {
         final FileObject fo = lookup.lookup(FileObject.class);
         if (fo != null) {
@@ -113,6 +113,7 @@
             if (dobj != null) {
                 PropertyChangeListener pchl = new PropertyChangeListener() {
                     /** annotate renamed files. */
+                    @Override
                     public void propertyChange(PropertyChangeEvent evt) {
                         if 
(DataObject.PROP_PRIMARY_FILE.equals(evt.getPropertyName())) {
                             DataObject dobj = (DataObject) evt.getSource();
@@ -174,6 +175,7 @@
         }
     }
 
+    @Override
     public void breakpointAdded(Breakpoint breakpoint) {
         if (isAnnotatable(breakpoint)) {
             JPDABreakpoint b = (JPDABreakpoint) breakpoint;
@@ -186,6 +188,7 @@
         }
     }
 
+    @Override
     public void breakpointRemoved(Breakpoint breakpoint) {
         if (isAnnotatable(breakpoint)) {
             JPDABreakpoint b = (JPDABreakpoint) breakpoint;
@@ -198,9 +201,12 @@
         }
     }
 
+    @Override
     public void propertyChange(PropertyChangeEvent evt) {
         String propertyName = evt.getPropertyName ();
-        if (propertyName == null) return;
+        if (propertyName == null) {
+            return;
+        }
         if ( (!JPDABreakpoint.PROP_ENABLED.equals (propertyName)) &&
              (!JPDABreakpoint.PROP_VALIDITY.equals (propertyName)) &&
              (!LineBreakpoint.PROP_CONDITION.equals (propertyName)) &&
@@ -212,7 +218,9 @@
              (!MethodBreakpoint.PROP_CLASS_EXCLUSION_FILTERS.equals 
(propertyName)) &&
              (!MethodBreakpoint.PROP_METHOD_NAME.equals (propertyName)) &&
              (!MethodBreakpoint.PROP_METHOD_SIGNATURE.equals (propertyName))
-        ) return;
+        ) {
+            return;
+        }
         JPDABreakpoint b = (JPDABreakpoint) evt.getSource ();
         DebuggerManager manager = DebuggerManager.getDebuggerManager();
         Breakpoint[] bkpts = manager.getBreakpoints();
@@ -241,11 +249,14 @@
             this.add = add;
         }
 
+        @Override
         public void run() {
             synchronized (breakpointToAnnotations) {
                 if (remove) {
                     removeAnnotations(b);
-                    if (!add) breakpointToAnnotations.remove(b);
+                    if (!add) {
+                        breakpointToAnnotations.remove(b);
+                    }
                 }
                 if (add) {
                     breakpointToAnnotations.put(b, new 
WeakSet<Annotation>());
@@ -290,7 +301,9 @@
         } else {
             throw new IllegalStateException(b.toString());
         }
-        if (isInvalid && b.isEnabled ()) annotationType += "_broken";
+        if (isInvalid && b.isEnabled ()) {
+            annotationType += "_broken";
+        }
         return annotationType;
     }
     
@@ -344,7 +357,7 @@
                     if (futurelns != null) {
                         if (!futurelns.isDone()) {
                             delayedAnnotation2(b, fo, futurelns);
-                        } else
+                        } else {
                         try {
                             newlns = futurelns.get();
                             if (newlns == null) {
@@ -365,6 +378,7 @@
                     }
                 }
             }
+            }
             return lns;
         } else if (b instanceof ClassLoadUnloadBreakpoint) {
             ClassLoadUnloadBreakpoint cb = (ClassLoadUnloadBreakpoint) b;
@@ -379,7 +393,7 @@
                     if (futurelns != null) {
                         if (!futurelns.isDone()) {
                             delayedAnnotation(b, fo, futurelns);
-                        } else
+                        } else {
                         try {
                             newline = futurelns.get();
                             if (newline == null) {
@@ -400,6 +414,7 @@
                     }
                 }
             }
+            }
             return lns;
         } else {
             throw new IllegalStateException(b.toString());
@@ -474,8 +489,10 @@
             
Logger.getLogger(BreakpointAnnotationProvider.class.getName()).log(Level.INFO,
 "No DO for "+fo, donfex);
             return ;
         }
-        LineCookie lc = dataObject.getCookie(LineCookie.class);
-        if (lc == null) return;
+        LineCookie lc = dataObject.getLookup().lookup(LineCookie.class);
+        if (lc == null) {
+            return;
+        }
         List<DebuggerBreakpointAnnotation> annotations = new 
ArrayList<DebuggerBreakpointAnnotation>();
         for (int l : lines) {
             try {
@@ -486,7 +503,7 @@
             } catch (IllegalArgumentException e) {
             }
         }
-        if (annotations.size() == 0) {
+        if (annotations.isEmpty()) {
             return ;
         }
         Set<Annotation> bpAnnotations = breakpointToAnnotations.get(b);
@@ -501,7 +518,9 @@
     // Is called under synchronized (breakpointToAnnotations)
     private void removeAnnotations(JPDABreakpoint b) {
         Set<Annotation> annotations = breakpointToAnnotations.remove(b);
-        if (annotations == null) return ;
+        if (annotations == null) {
+            return ;
+        }
         for (Annotation a : annotations) {
             a.detach();
         }
@@ -509,27 +528,35 @@
     
 
     // Not used
+    @Override
     public Breakpoint[] initBreakpoints() { return new Breakpoint[] {}; }
 
     // Not used
+    @Override
     public void initWatches() {}
 
     // Not used
+    @Override
     public void watchAdded(Watch watch) {}
 
     // Not used
+    @Override
     public void watchRemoved(Watch watch) {}
 
     // Not used
+    @Override
     public void sessionAdded(Session session) {}
 
     // Not used
+    @Override
     public void sessionRemoved(Session session) {}
 
     // Not used
+    @Override
     public void engineAdded(DebuggerEngine engine) {}
 
     // Not used
+    @Override
     public void engineRemoved(DebuggerEngine engine) {}
 
 }
diff --git 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/BreakpointsActionsProvider.java
 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/BreakpointsActionsProvider.java
--- 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/BreakpointsActionsProvider.java
+++ 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/BreakpointsActionsProvider.java
@@ -70,7 +70,6 @@
 
 import org.openide.ErrorManager;
 import org.openide.filesystems.FileObject;
-import org.openide.filesystems.FileStateInvalidException;
 import org.openide.filesystems.URLMapper;
 import org.openide.util.Exceptions;
 import org.openide.util.NbBundle;
@@ -86,9 +85,11 @@
     private static final Action GO_TO_SOURCE_ACTION = Models.createAction (
         loc("CTL_Breakpoint_GoToSource_Label"), // NOI18N
         new Models.ActionPerformer () {
+            @Override
             public boolean isEnabled (Object node) {
                 return true;
             }
+            @Override
             public void perform (Object[] nodes) {
                 goToSource ((JPDABreakpoint) nodes [0]);
             }
@@ -97,14 +98,15 @@
     );
         
     private static String loc(String key) {
-        return 
NbBundle.getBundle(BreakpointsActionsProvider.class).getString(key);
+        return NbBundle.getMessage(BreakpointsActionsProvider.class, key);
     }
 
+    @Override
     public Action[] getActions (NodeActionsProvider original, Object node) 
     throws UnknownTypeException {
-        if (!(node instanceof JPDABreakpoint) || node instanceof 
ThreadBreakpoint)
+        if (!(node instanceof JPDABreakpoint) || node instanceof 
ThreadBreakpoint) {
             return original.getActions (node);
-        
+        }
         Action[] oas = original.getActions (node);
         Action[] as = new Action [oas.length + 2];
         as [0] = GO_TO_SOURCE_ACTION;
@@ -113,12 +115,14 @@
         return as;
     }
     
+    @Override
     public void performDefaultAction (NodeActionsProvider original, Object 
node) throws UnknownTypeException {
-        if (node instanceof JPDABreakpoint && !(node instanceof 
ThreadBreakpoint)) 
+        if (node instanceof JPDABreakpoint && !(node instanceof 
ThreadBreakpoint)) {
             goToSource ((JPDABreakpoint) node);
-        else
+        } else {
             original.performDefaultAction (node);
     }
+    }
 
     private static void goToSource (JPDABreakpoint b) {
         String url;
@@ -128,18 +132,18 @@
             LineBreakpoint lb = (LineBreakpoint) b;
             url = lb.getURL();
             lineNumber = lb.getLineNumber();
-            if (lineNumber < 1) lineNumber = 1;
+            if (lineNumber < 1) {
+                lineNumber = 1;
+            }
         } else if (b instanceof FieldBreakpoint) {
             FieldBreakpoint fb = (FieldBreakpoint) b;
             String fieldName = fb.getFieldName();
             String className = fb.getClassName ();
             FileObject fo = getFileObject(getRelativePath (className));
-            if (fo == null) return ;
-            try {
-                url = fo.getURL ().toString ();
-            } catch (FileStateInvalidException e) {
+            if (fo == null) {
                 return ;
             }
+            url = fo.toURL ().toString ();
             Future<Integer> fi = EditorContextImpl.getFieldLineNumber (
                 fo,
                 className,
@@ -162,15 +166,15 @@
             MethodBreakpoint mb = (MethodBreakpoint) b;
             String methodName = mb.getMethodName();
             String[] classFilters = mb.getClassFilters();
-            if (classFilters.length < 1) return ;
+            if (classFilters.length < 1) {
+                return ;
+            }
             String className = classFilters[0];
             FileObject fo = getFileObject(getRelativePath (className));
-            if (fo == null) return ;
-            try {
-                url = fo.getURL ().toString ();
-            } catch (FileStateInvalidException e) {
+            if (fo == null) {
                 return ;
             }
+            url = fo.toURL ().toString ();
             Future<int[]> fi = EditorContextImpl.getMethodLineNumbers(
                 fo,
                 className,
@@ -182,8 +186,11 @@
                 int[] lineNumbers;
                 try {
                     lineNumbers = fi.get();
-                    if (lineNumbers.length == 0) lineNumber = 1;
-                    else lineNumber = lineNumbers[0];
+                    if (lineNumbers.length == 0) {
+                        lineNumber = 1;
+                    } else {
+                        lineNumber = lineNumbers[0];
+                    }
                 } catch (InterruptedException ex) {
                     lineNumber = 1;
                 } catch (ExecutionException ex) {
@@ -198,26 +205,24 @@
             ExceptionBreakpoint eb = (ExceptionBreakpoint) b;
             String className = eb.getExceptionClassName();
             FileObject fo = getFileObject(getRelativePath (className));
-            if (fo == null) return ;
-            try {
-                url = fo.getURL ().toString ();
-            } catch (FileStateInvalidException e) {
+            if (fo == null) {
                 return ;
             }
+            url = fo.toURL ().toString ();
             // TODO: EditorContextImpl.getClassLineNumber(fo, className);
             lineNumber = 1;
         } else if (b instanceof ClassLoadUnloadBreakpoint) {
             ClassLoadUnloadBreakpoint cb = (ClassLoadUnloadBreakpoint) b;
             String[] classNames = cb.getClassFilters();
-            if (classNames.length == 0) return;
+            if (classNames.length == 0) {
+                return;
+            }
             String className = classNames[0];
             FileObject fo = getFileObject(getRelativePath (className));
-            if (fo == null) return ;
-            try {
-                url = fo.getURL ().toString ();
-            } catch (FileStateInvalidException e) {
+            if (fo == null) {
                 return ;
             }
+            url = fo.toURL ().toString ();
             // TODO: EditorContextImpl.getClassLineNumber(fo, className);
             lineNumber = 1;
         } else {
@@ -227,6 +232,7 @@
             final Future future = futureLineNumber;
             final String u = url;
             RequestProcessor.getDefault().post(new Runnable() {
+                @Override
                 public void run() {
                     try {
                         Object lineObj = future.get();
@@ -242,6 +248,7 @@
                             }
                         }
                         SwingUtilities.invokeLater(new Runnable() {
+                            @Override
                             public void run() {
                                 EditorContextImpl.showSourceLine (
                                     u,
@@ -263,7 +270,6 @@
             lineNumber,
             null
         );
-        return ;
     }
     
     private static FileObject getFileObject(String classRelPath) {
@@ -294,7 +300,9 @@
 
     private static String getRelativePath (String className) {
         int i = className.indexOf ('$');
-        if (i > 0) className = className.substring (0, i);
+        if (i > 0) {
+            className = className.substring (0, i);
+        }
         String sourceName = className.replace 
             ('.', '/') + ".java";
         return sourceName;
diff --git 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ClassScanner.java
 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ClassScanner.java
--- 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ClassScanner.java
+++ 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ClassScanner.java
@@ -108,13 +108,13 @@
     }
     
     private static boolean match (String name, String pattern) {
-        if (pattern.startsWith ("*"))
+        if (pattern.startsWith ("*")) {
             return name.endsWith (pattern.substring (1));
-        else
-        if (pattern.endsWith ("*"))
+        } else if (pattern.endsWith ("*")) {
             return name.startsWith (
                 pattern.substring (0, pattern.length () - 1)
             );
+        }
         return name.equals (pattern);
     }
     
diff --git 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/DebuggerAnnotation.java
 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/DebuggerAnnotation.java
--- 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/DebuggerAnnotation.java
+++ 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/DebuggerAnnotation.java
@@ -116,16 +116,17 @@
     
     @Override
     public String getShortDescription () {
-        if (type == EditorContext.CURRENT_LINE_ANNOTATION_TYPE)
+        if (type == EditorContext.CURRENT_LINE_ANNOTATION_TYPE) {
             return NbBundle.getMessage 
                 (DebuggerAnnotation.class, "TOOLTIP_CURRENT_PC"); // NOI18N
-        if (type == 
EditorContext.CURRENT_EXPRESSION_CURRENT_LINE_ANNOTATION_TYPE)
+        }
+        if (type == 
EditorContext.CURRENT_EXPRESSION_CURRENT_LINE_ANNOTATION_TYPE) {
             return NbBundle.getMessage 
                 (DebuggerAnnotation.class, "TOOLTIP_CURRENT_EXP_LINE"); // 
NOI18N
-        else
-        if (type == EditorContext.CALL_STACK_FRAME_ANNOTATION_TYPE)
+        } else if (type == EditorContext.CALL_STACK_FRAME_ANNOTATION_TYPE) {
             return NbBundle.getBundle (DebuggerAnnotation.class).getString 
                 ("TOOLTIP_CALLSITE"); // NOI18N
+        }
         if (type == EditorContext.OTHER_THREAD_ANNOTATION_TYPE) {
             return NbBundle.getMessage(DebuggerAnnotation.class, 
"TOOLTIP_OTHER_THREAD", thread.getName());
         }
diff --git 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/DebuggerBreakpointAnnotation.java
 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/DebuggerBreakpointAnnotation.java
--- 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/DebuggerBreakpointAnnotation.java
+++ 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/DebuggerBreakpointAnnotation.java
@@ -45,7 +45,6 @@
 package org.netbeans.modules.debugger.jpda.projects;
 
 import org.netbeans.api.debugger.Breakpoint;
-import org.netbeans.api.debugger.jpda.JPDABreakpoint;
 import org.netbeans.spi.debugger.jpda.EditorContext;
 import org.netbeans.spi.debugger.ui.BreakpointAnnotation;
 
@@ -73,6 +72,7 @@
         attach (line);
     }
     
+    @Override
     public String getAnnotationType () {
         return type;
     }
@@ -81,6 +81,7 @@
         return line;
     }
     
+    @Override
     public String getShortDescription () {
         if (type.endsWith("_broken")) {
             if (breakpoint.getValidity() == Breakpoint.VALIDITY.INVALID) {
@@ -88,43 +89,49 @@
                 return 
NbBundle.getMessage(DebuggerBreakpointAnnotation.class,
                                            
"TOOLTIP_BREAKPOINT_BROKEN_INVALID", msg);
             }
-            return NbBundle.getBundle 
(DebuggerBreakpointAnnotation.class).getString 
-                ("TOOLTIP_BREAKPOINT_BROKEN"); // NOI18N
+            return NbBundle.getMessage 
+                (DebuggerBreakpointAnnotation.class, 
"TOOLTIP_BREAKPOINT_BROKEN"); // NOI18N
         }
-        if (type == EditorContext.BREAKPOINT_ANNOTATION_TYPE)
-            return NbBundle.getBundle 
(DebuggerBreakpointAnnotation.class).getString 
-                ("TOOLTIP_BREAKPOINT"); // NOI18N
-        else 
-        if (type == EditorContext.DISABLED_BREAKPOINT_ANNOTATION_TYPE)
-            return NbBundle.getBundle 
(DebuggerBreakpointAnnotation.class).getString 
-                ("TOOLTIP_DISABLED_BREAKPOINT"); // NOI18N
-        else 
-        if (type == EditorContext.CONDITIONAL_BREAKPOINT_ANNOTATION_TYPE)
-            return NbBundle.getBundle 
(DebuggerBreakpointAnnotation.class).getString 
-                ("TOOLTIP_CONDITIONAL_BREAKPOINT"); // NOI18N
-        else
-        if (type == 
EditorContext.DISABLED_CONDITIONAL_BREAKPOINT_ANNOTATION_TYPE)
-            return NbBundle.getBundle 
(DebuggerBreakpointAnnotation.class).getString 
-                ("TOOLTIP_DISABLED_CONDITIONAL_BREAKPOINT"); // NOI18N
-        else
-        if (type == EditorContext.FIELD_BREAKPOINT_ANNOTATION_TYPE)
-            return NbBundle.getBundle 
(DebuggerBreakpointAnnotation.class).getString 
-                ("TOOLTIP_FIELD_BREAKPOINT"); // NOI18N
-        if (type == EditorContext.DISABLED_FIELD_BREAKPOINT_ANNOTATION_TYPE)
-            return NbBundle.getBundle 
(DebuggerBreakpointAnnotation.class).getString 
-                ("TOOLTIP_DISABLED_FIELD_BREAKPOINT"); // NOI18N
-        if (type == EditorContext.METHOD_BREAKPOINT_ANNOTATION_TYPE)
-            return NbBundle.getBundle 
(DebuggerBreakpointAnnotation.class).getString 
-                ("TOOLTIP_METHOD_BREAKPOINT"); // NOI18N
-        if (type == EditorContext.DISABLED_METHOD_BREAKPOINT_ANNOTATION_TYPE)
-            return NbBundle.getBundle 
(DebuggerBreakpointAnnotation.class).getString 
-                ("TOOLTIP_DISABLED_METHOD_BREAKPOINT"); // NOI18N
-        if (type == EditorContext.CLASS_BREAKPOINT_ANNOTATION_TYPE)
-            return NbBundle.getBundle 
(DebuggerBreakpointAnnotation.class).getString
-                ("TOOLTIP_CLASS_BREAKPOINT"); // NOI18N
-        if (type == EditorContext.DISABLED_CLASS_BREAKPOINT_ANNOTATION_TYPE)
-            return NbBundle.getBundle 
(DebuggerBreakpointAnnotation.class).getString
-                ("TOOLTIP_DISABLED_CLASS_BREAKPOINT"); // NOI18N
+        if (type == EditorContext.BREAKPOINT_ANNOTATION_TYPE) {
+            return NbBundle.getMessage 
+                (DebuggerBreakpointAnnotation.class, "TOOLTIP_BREAKPOINT"); 
// NOI18N
+        } else 
+        if (type == EditorContext.DISABLED_BREAKPOINT_ANNOTATION_TYPE) {
+            return NbBundle.getMessage 
+                (DebuggerBreakpointAnnotation.class, 
"TOOLTIP_DISABLED_BREAKPOINT"); // NOI18N
+        } else 
+        if (type == EditorContext.CONDITIONAL_BREAKPOINT_ANNOTATION_TYPE) {
+            return NbBundle.getMessage 
+                (DebuggerBreakpointAnnotation.class, 
"TOOLTIP_CONDITIONAL_BREAKPOINT"); // NOI18N
+        } else
+        if (type == 
EditorContext.DISABLED_CONDITIONAL_BREAKPOINT_ANNOTATION_TYPE) {
+            return NbBundle.getMessage 
+                (DebuggerBreakpointAnnotation.class, 
"TOOLTIP_DISABLED_CONDITIONAL_BREAKPOINT"); // NOI18N
+        } else
+        if (type == EditorContext.FIELD_BREAKPOINT_ANNOTATION_TYPE) {
+            return NbBundle.getMessage 
+                (DebuggerBreakpointAnnotation.class, 
"TOOLTIP_FIELD_BREAKPOINT"); // NOI18N
+        } else
+        if (type == EditorContext.DISABLED_FIELD_BREAKPOINT_ANNOTATION_TYPE) 
{
+            return NbBundle.getMessage 
+                (DebuggerBreakpointAnnotation.class, 
"TOOLTIP_DISABLED_FIELD_BREAKPOINT"); // NOI18N
+        } else
+        if (type == EditorContext.METHOD_BREAKPOINT_ANNOTATION_TYPE) {
+            return NbBundle.getMessage 
+                (DebuggerBreakpointAnnotation.class, 
"TOOLTIP_METHOD_BREAKPOINT"); // NOI18N
+        } else
+        if (type == 
EditorContext.DISABLED_METHOD_BREAKPOINT_ANNOTATION_TYPE) {
+            return NbBundle.getMessage 
+                (DebuggerBreakpointAnnotation.class, 
"TOOLTIP_DISABLED_METHOD_BREAKPOINT"); // NOI18N
+        } else
+        if (type == EditorContext.CLASS_BREAKPOINT_ANNOTATION_TYPE) {
+            return NbBundle.getMessage
+                (DebuggerBreakpointAnnotation.class, 
"TOOLTIP_CLASS_BREAKPOINT"); // NOI18N
+        } else
+        if (type == EditorContext.DISABLED_CLASS_BREAKPOINT_ANNOTATION_TYPE) 
{
+            return NbBundle.getMessage
+                (DebuggerBreakpointAnnotation.class, 
"TOOLTIP_DISABLED_CLASS_BREAKPOINT"); // NOI18N
+        }
         ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, new 
IllegalStateException("Unknown breakpoint type '"+type+"'."));
         return null;
     }
diff --git 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/EditorContextImpl.java
 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/EditorContextImpl.java
--- 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/EditorContextImpl.java
+++ 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/EditorContextImpl.java
@@ -88,7 +88,6 @@
 
 import java.util.Collections;
 import java.util.Date;
-import java.util.WeakHashMap;
 import javax.lang.model.element.Element;
 import javax.lang.model.element.ElementKind;
 import javax.lang.model.element.ExecutableElement;
@@ -169,7 +168,7 @@
         System.getProperty ("netbeans.debugger.fronting", "true");
 
     private PropertyChangeSupport   pcs;
-    private Map                     annotationToURL = new HashMap ();
+    private Map<Annotation, String> annotationToURL = new 
HashMap<Annotation, String>();
     private PropertyChangeListener  dispatchListener;
     private EditorContextDispatcher contextDispatcher;
     private final Map<JavaSource, JavaSourceUtil.Handle> sourceHandles = new 
WeakHashMapActive<JavaSource, JavaSourceUtil.Handle>();
@@ -435,7 +434,7 @@
         if (timeStamp == null) {
             return line.getLineNumber () + 1;
         }
-        String url = (String) annotationToURL.get (annotation);
+        String url = annotationToURL.get ((Annotation) annotation);
         Line.Set lineSet = LineTranslations.getTranslations().getLineSet 
(url, timeStamp);
         return lineSet.getOriginalLineNumber (line) + 1;
     }
@@ -2053,7 +2052,7 @@
         try {
             CompilationController ci = getPreferredCompilationController(fo, 
js);
             //t2 = System.nanoTime();
-            final ParseExpressionTask task = new 
ParseExpressionTask(expression, line, context);
+            final ParseExpressionTask<D> task = new 
ParseExpressionTask<D>(expression, line, context);
             if (fo != null && SourceUtils.isScanInProgress()) {
                 final StyledDocument doc = findDocument(fo);
                 if (doc == null) {
diff --git 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ExpressionScanner.java
 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ExpressionScanner.java
--- 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ExpressionScanner.java
+++ 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ExpressionScanner.java
@@ -46,69 +46,46 @@
 
 import com.sun.source.tree.AnnotationTree;
 import com.sun.source.tree.ArrayAccessTree;
-import com.sun.source.tree.ArrayTypeTree;
 import com.sun.source.tree.AssertTree;
 import com.sun.source.tree.AssignmentTree;
 import com.sun.source.tree.BinaryTree;
-import com.sun.source.tree.BlockTree;
-import com.sun.source.tree.BreakTree;
 import com.sun.source.tree.CaseTree;
-import com.sun.source.tree.CatchTree;
-import com.sun.source.tree.ClassTree;
 import com.sun.source.tree.CompilationUnitTree;
 import com.sun.source.tree.CompoundAssignmentTree;
 import com.sun.source.tree.ConditionalExpressionTree;
-import com.sun.source.tree.ContinueTree;
 import com.sun.source.tree.DoWhileLoopTree;
-import com.sun.source.tree.EmptyStatementTree;
 import com.sun.source.tree.EnhancedForLoopTree;
-import com.sun.source.tree.ErroneousTree;
 import com.sun.source.tree.ExpressionStatementTree;
-import com.sun.source.tree.ExpressionTree;
 import com.sun.source.tree.ForLoopTree;
-import com.sun.source.tree.IdentifierTree;
 import com.sun.source.tree.IfTree;
-import com.sun.source.tree.ImportTree;
 import com.sun.source.tree.InstanceOfTree;
-import com.sun.source.tree.LabeledStatementTree;
 import com.sun.source.tree.LineMap;
-import com.sun.source.tree.LiteralTree;
-import com.sun.source.tree.MemberSelectTree;
 import com.sun.source.tree.MethodInvocationTree;
-import com.sun.source.tree.MethodTree;
 import com.sun.source.tree.ModifiersTree;
 import com.sun.source.tree.NewArrayTree;
 import com.sun.source.tree.NewClassTree;
 import com.sun.source.tree.ParameterizedTypeTree;
-import com.sun.source.tree.ParenthesizedTree;
-import com.sun.source.tree.PrimitiveTypeTree;
 import com.sun.source.tree.ReturnTree;
 import com.sun.source.tree.StatementTree;
 import com.sun.source.tree.SwitchTree;
 import com.sun.source.tree.SynchronizedTree;
 import com.sun.source.tree.ThrowTree;
 import com.sun.source.tree.Tree;
-import com.sun.source.tree.TreeVisitor;
-import com.sun.source.tree.TryTree;
 import com.sun.source.tree.TypeCastTree;
-import com.sun.source.tree.TypeParameterTree;
 import com.sun.source.tree.UnaryTree;
 import com.sun.source.tree.VariableTree;
 import com.sun.source.tree.WhileLoopTree;
-import com.sun.source.tree.WildcardTree;
 import com.sun.source.util.SourcePositions;
 import com.sun.source.util.TreeScanner;
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.Stack;
-import java.util.TreeSet;
 import javax.tools.Diagnostic;
 
 /**
@@ -137,7 +114,9 @@
         int end = (int) positions.getEndPosition(tree, aTree);
         return start <= offset && offset < end;
          */
-        if (!checkBounds) return true;
+        if (!checkBounds) {
+            return true;
+        }
         int startLine = (int) 
lineMap.getLineNumber(positions.getStartPosition(tree, aTree));
         if (startLine == lineNumber) {
             return true;
@@ -152,23 +131,29 @@
     
     private boolean isCurrentTree(Tree aTree) {
         int startLine = (int) 
lineMap.getLineNumber(positions.getStartPosition(tree, aTree));
-        if (startLine == Diagnostic.NOPOS) return false;
+        if (startLine == Diagnostic.NOPOS) {
+            return false;
+        }
         int endLine = (int) 
lineMap.getLineNumber(positions.getEndPosition(tree, aTree));
-        if (endLine == Diagnostic.NOPOS) return false;
+        if (endLine == Diagnostic.NOPOS) {
+            return false;
+        }
         return startLine <= lineNumber && lineNumber <= endLine;
     }
 
+    @Override
     public List<Tree> reduce(List<Tree> r1, List<Tree> r2) {
-        if (r1 == null || r1.size() == 0) {
+        if (r1 == null || r1.isEmpty()) {
             return r2;
         }
-        if (r2 == null || r2.size() == 0) {
+        if (r2 == null || r2.isEmpty()) {
             return r1;
         }
         r1.addAll(r2);
         return r1;
     }
 
+    @Override
     public List<Tree> scan(Iterable<? extends Tree> nodes, 
ExpressionScanner.ExpressionsInfo p) {
        List<Tree> r = null;
        if (nodes != null) {
@@ -189,21 +174,24 @@
         return result;
     }
 
+    @Override
     public List<Tree> visitAnnotation(AnnotationTree node, 
ExpressionScanner.ExpressionsInfo p) {
         return null;
     }
 
+    @Override
     public List<Tree> visitMethodInvocation(MethodInvocationTree node, 
ExpressionScanner.ExpressionsInfo p) {
        List<Tree> result = scan(node.getTypeArguments(), p);
         result = reduce(result, scan(node.getMethodSelect(), p));
         result = reduce(result, scan(node.getArguments(), p));
         if (result == null) {
-            result = new ArrayList();
+            result = new ArrayList<Tree>();
         }
         result.add(node);
         return result;
     }
 
+    @Override
     public List<Tree> visitAssert(AssertTree node, 
ExpressionScanner.ExpressionsInfo p) {
         if (acceptsTree(node)) {
             List<Tree> result = scan(node.getCondition(), p);
@@ -214,14 +202,17 @@
         }
     }
 
+    @Override
     public List<Tree> visitAssignment(AssignmentTree node, 
ExpressionScanner.ExpressionsInfo p) {
         return scan(node.getVariable(), node.getExpression(), p);
     }
 
+    @Override
     public List<Tree> visitCompoundAssignment(CompoundAssignmentTree node, 
ExpressionScanner.ExpressionsInfo p) {
         return scan(node.getVariable(), node.getExpression(), p);
     }
 
+    @Override
     public List<Tree> visitBinary(BinaryTree node, 
ExpressionScanner.ExpressionsInfo p) {
         return scan(node.getLeftOperand(), node.getRightOperand(), p);
     }
@@ -232,6 +223,7 @@
     //public List<Tree> visitBreak(BreakTree node, 
ExpressionScanner.ExpressionsInfo p) {
     //}
 
+    @Override
     public List<Tree> visitCase(CaseTree node, 
ExpressionScanner.ExpressionsInfo p) {
         List<Tree> result = scan(node.getExpression(), p);
         result = reduce(result, scan(node.getStatements(), p));
@@ -244,6 +236,7 @@
     //public List<Tree> visitClass(ClassTree node, 
ExpressionScanner.ExpressionsInfo p) {
     //}
 
+    @Override
     public List<Tree> visitConditionalExpression(ConditionalExpressionTree 
node, ExpressionScanner.ExpressionsInfo p) {
         List<Tree> cond = scan(node.getCondition(), p);
         Tree lastCond = null;
@@ -266,6 +259,7 @@
     //public List<Tree> visitContinue(ContinueTree node, 
ExpressionScanner.ExpressionsInfo p) {
     //}
 
+    @Override
     public List<Tree> visitDoWhileLoop(DoWhileLoopTree node, 
ExpressionScanner.ExpressionsInfo p) {
         List<Tree> statements = scan(node.getStatement(), p);
         List<Tree> cond = null;
@@ -282,6 +276,7 @@
     //public List<Tree> visitErroneous(ErroneousTree node, 
ExpressionScanner.ExpressionsInfo p) {
     //}
 
+    @Override
     public List<Tree> visitExpressionStatement(ExpressionStatementTree node, 
ExpressionScanner.ExpressionsInfo p) {
         if (acceptsTree(node)) {
             return scan(node.getExpression(), p);
@@ -290,6 +285,7 @@
         }
     }
 
+    @Override
     public List<Tree> visitEnhancedForLoop(EnhancedForLoopTree node, 
ExpressionScanner.ExpressionsInfo p) {
         List<Tree> expr = null;
         if (acceptsTree(node.getExpression())) {
@@ -304,6 +300,7 @@
         return reduce(expr, bodyr);
     }
 
+    @Override
     public List<Tree> visitForLoop(ForLoopTree node, 
ExpressionScanner.ExpressionsInfo p) {
         if (!isCurrentTree(node)) {
             return null;
@@ -359,6 +356,7 @@
     //public List<Tree> visitIdentifier(IdentifierTree node, 
ExpressionScanner.ExpressionsInfo p) {
     //}
 
+    @Override
     public List<Tree> visitIf(IfTree node, ExpressionScanner.ExpressionsInfo 
p) {
         List<Tree> cond = null;
         Tree lastCond = null;
@@ -390,6 +388,7 @@
     //public List<Tree> visitImport(ImportTree node, 
ExpressionScanner.ExpressionsInfo p) {
     //}
 
+    @Override
     public List<Tree> visitArrayAccess(ArrayAccessTree node, 
ExpressionScanner.ExpressionsInfo p) {
         return scan(node.getExpression(), node.getIndex(), p);
     }
@@ -403,10 +402,12 @@
     //public List<Tree> visitMethod(MethodTree node, 
ExpressionScanner.ExpressionsInfo p) {
     //}
 
+    @Override
     public List<Tree> visitModifiers(ModifiersTree node, 
ExpressionScanner.ExpressionsInfo p) {
         return null;
     }
 
+    @Override
     public List<Tree> visitNewArray(NewArrayTree node, 
ExpressionScanner.ExpressionsInfo p) {
         List<Tree> result = scan(node.getType(), p);
         result = reduce(result, scan(node.getDimensions(), p));
@@ -414,12 +415,13 @@
         return result;
     }
 
+    @Override
     public List<Tree> visitNewClass(NewClassTree node, 
ExpressionScanner.ExpressionsInfo p) {
         List<Tree> result = scan(node.getEnclosingExpression(), 
node.getIdentifier(), p);
         result = reduce(result, scan(node.getArguments(), p));
         result = reduce(result, scan(node.getClassBody(), p));
         if (result == null) {
-            result = new ArrayList();
+            result = new ArrayList<Tree>();
         }
         result.add(node);
         return result;
@@ -437,6 +439,7 @@
     //public List<Tree> visitEmptyStatement(EmptyStatementTree node, 
ExpressionScanner.ExpressionsInfo p) {
     //}
 
+    @Override
     public List<Tree> visitSwitch(SwitchTree node, 
ExpressionScanner.ExpressionsInfo p) {
         List<Tree> result = null;
         if (acceptsTree(node)) {
@@ -445,6 +448,7 @@
         return reduce(result, scan(node.getCases(), p));
     }
 
+    @Override
     public List<Tree> visitSynchronized(SynchronizedTree node, 
ExpressionScanner.ExpressionsInfo p) {
         List<Tree> result = null;
         if (acceptsTree(node)) {
@@ -453,6 +457,7 @@
         return reduce(result, scan(node.getBlock(), p));
     }
 
+    @Override
     public List<Tree> visitThrow(ThrowTree node, 
ExpressionScanner.ExpressionsInfo p) {
         List<Tree> result = null;
         if (acceptsTree(node)) {
@@ -467,6 +472,7 @@
     //public List<Tree> visitTry(TryTree node, 
ExpressionScanner.ExpressionsInfo p) {
     //}
 
+    @Override
     public List<Tree> visitParameterizedType(ParameterizedTypeTree node, 
ExpressionScanner.ExpressionsInfo p) {
         return null;
     }
@@ -474,6 +480,7 @@
     //public List<Tree> visitArrayType(ArrayTypeTree node, 
ExpressionScanner.ExpressionsInfo p) {
     //}
 
+    @Override
     public List<Tree> visitTypeCast(TypeCastTree node, 
ExpressionScanner.ExpressionsInfo p) {
         return scan(node.getExpression(), p);
     }
@@ -484,14 +491,17 @@
     //public List<Tree> visitTypeParameter(TypeParameterTree node, 
ExpressionScanner.ExpressionsInfo p) {
     //}
 
+    @Override
     public List<Tree> visitInstanceOf(InstanceOfTree node, 
ExpressionScanner.ExpressionsInfo p) {
         return scan(node.getExpression(), node.getType(), p);
     }
 
+    @Override
     public List<Tree> visitUnary(UnaryTree node, 
ExpressionScanner.ExpressionsInfo p) {
         return scan(node.getExpression(), p);
     }
 
+    @Override
     public List<Tree> visitVariable(VariableTree node, 
ExpressionScanner.ExpressionsInfo p) {
         if (acceptsTree(node)) {
             return scan(node.getInitializer(), p);
@@ -500,6 +510,7 @@
         }
     }
 
+    @Override
     public List<Tree> visitWhileLoop(WhileLoopTree node, 
ExpressionScanner.ExpressionsInfo p) {
         List<Tree> cond = null;
         if (acceptsTree(node.getCondition())) {
@@ -526,6 +537,7 @@
     //public List<Tree> visitWildcard(WildcardTree node, 
ExpressionScanner.ExpressionsInfo p) {
     //}
 
+    @Override
     public List<Tree> visitOther(Tree node, 
ExpressionScanner.ExpressionsInfo p) {
         return null;
     }
diff --git 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/FixActionProvider.java
 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/FixActionProvider.java
--- 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/FixActionProvider.java
+++ 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/FixActionProvider.java
@@ -81,7 +81,6 @@
 import org.openide.awt.StatusDisplayer;
 import org.openide.filesystems.FileObject;
 import org.openide.filesystems.FileUtil;
-import org.openide.filesystems.URLMapper;
 import org.openide.loaders.DataObject;
 import org.openide.loaders.DataObjectNotFoundException;
 import org.openide.nodes.Node;
@@ -140,10 +139,12 @@
         EditorContextDispatcher.getDefault().removePropertyChangeListener 
(listener);
     }
     
+    @Override
     public Set getActions () {
         return Collections.singleton (ActionsManager.ACTION_FIX);
     }
     
+    @Override
     public void doAction (Object action) {
         if (!isFixCommandSupported) {
             Set<FileObject> sourceRootsFO = getSourceRootsFO(sp);
@@ -155,6 +156,7 @@
         if (!SwingUtilities.isEventDispatchThread()) {
             try {
                 SwingUtilities.invokeAndWait(new Runnable() {
+                    @Override
                     public void run() {
                         invokeAction();
                     }
@@ -174,7 +176,7 @@
             return ((SourcePathProviderImpl) sp).getSourceRootsFO();
         } else {
             String[] sourceRoots = sp.getSourceRoots();
-            Set<FileObject> fos = new HashSet();
+            Set<FileObject> fos = new HashSet<FileObject>();
             for (String root : sourceRoots) {
                 FileObject fo;
                 int jarIndex = root.indexOf("!/");
@@ -209,8 +211,10 @@
      */ 
     private Project getCurrentProject() {
         Node[] nodes = TopComponent.getRegistry ().getActivatedNodes ();
-        if (nodes == null || nodes.length == 0) return 
MainProjectManager.getDefault().getMainProject();
-        DataObject dao = (DataObject) nodes[0].getCookie(DataObject.class);
+        if (nodes == null || nodes.length == 0) {
+            return MainProjectManager.getDefault().getMainProject();
+        }
+        DataObject dao = (DataObject) 
nodes[0].getLookup().lookup(DataObject.class);
         if (dao == null || !dao.isValid()) {
             return MainProjectManager.getDefault().getMainProject();
         }
@@ -219,7 +223,9 @@
     
     private boolean shouldBeEnabled () {
         // check if current debugger supports this action
-        if (!debugger.canFixClasses()) return false;
+        if (!debugger.canFixClasses()) {
+            return false;
+        }
         // check if current project supports this action
         isFixCommandSupported = false;
         Project p = getCurrentProject();
@@ -259,12 +265,13 @@
     private Lookup getLookup () {
         Node[] nodes = TopComponent.getRegistry ().getActivatedNodes ();
         int i, k = nodes.length;
-        ArrayList l = new ArrayList ();
+        ArrayList<DataObject> l = new ArrayList<DataObject>();
         for (i = 0; i < k; i++) {
-            DataObject dobj = (DataObject)nodes [i].getCookie 
(DataObject.class);
-            if (dobj != null && dobj.isValid())
+            DataObject dobj = nodes [i].getLookup().lookup 
(DataObject.class);
+            if (dobj != null && dobj.isValid()) {
                 l.add (dobj);
         }
+        }
         if (l.isEmpty()) {
             FileObject fo = 
EditorContextDispatcher.getDefault().getMostRecentFile();
             if (fo != null) {
@@ -274,11 +281,11 @@
                 } catch (DataObjectNotFoundException ex) {}
             }
         }
-        return Lookups.fixed (l.toArray (new DataObject [l.size ()]));
+        return Lookups.fixed ((Object[]) l.toArray (new DataObject [l.size 
()]));
     }
     
     static void reloadClasses(final JPDADebugger debugger, Map<String, 
FileObject> classes) {
-        final Map map = new HashMap();
+        final Map<String, byte[]> map = new HashMap<String, byte[]>();
         for (String className : classes.keySet()) {
             FileObject fo = classes.get(className);
             InputStream is = null;
@@ -303,7 +310,7 @@
             }
         }
 
-        if (map.size() == 0) {
+        if (map.isEmpty()) {
             //System.out.println(" No class to reload");
             return ;
         }
@@ -318,6 +325,7 @@
         }
 
         rp.post(new Runnable() {
+            @Override
             public void run() {
                 String error = null;
                 try {
@@ -363,24 +371,36 @@
     DebuggerManagerListener {
         public Listener () {}
         
+        @Override
         public void propertyChange (PropertyChangeEvent e) {
             boolean en = shouldBeEnabled ();
             setEnabled (
                 ActionsManager.ACTION_FIX,
                 en
             );
-            if (debugger.getState () == JPDADebugger.STATE_DISCONNECTED) 
+            if (debugger.getState () == JPDADebugger.STATE_DISCONNECTED) {
                 destroy ();
         }
+        }
+        @Override
         public void sessionRemoved (Session session) {}
+        @Override
         public void breakpointAdded (Breakpoint breakpoint) {}
+        @Override
         public void breakpointRemoved (Breakpoint breakpoint) {}
+        @Override
         public Breakpoint[] initBreakpoints () {return new Breakpoint [0];}
+        @Override
         public void initWatches () {}
+        @Override
         public void sessionAdded (Session session) {}
+        @Override
         public void watchAdded (Watch watch) {}
+        @Override
         public void watchRemoved (Watch watch) {}
+        @Override
         public void engineAdded (DebuggerEngine engine) {}
+        @Override
         public void engineRemoved (DebuggerEngine engine) {}
     }
 
diff --git 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/HighlightsLayerFactoryImpl.java
 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/HighlightsLayerFactoryImpl.java
--- 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/HighlightsLayerFactoryImpl.java
+++ 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/HighlightsLayerFactoryImpl.java
@@ -41,6 +41,7 @@
  */
 public class HighlightsLayerFactoryImpl implements HighlightsLayerFactory {
     
+    @Override
     public HighlightsLayer[] createLayers(Context context) {
         return new HighlightsLayer[] {
             HighlightsLayer.create(DebuggerAnnotation.class.getName(),
diff --git 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/LineTranslations.java
 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/LineTranslations.java
--- 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/LineTranslations.java
+++ 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/LineTranslations.java
@@ -218,7 +218,9 @@
             return currentLineNumber;
         } else {
             Line.Set lineSet = getLineSet (url, timeStamp);
-            if (lineSet == null) return currentLineNumber;
+            if (lineSet == null) {
+                return currentLineNumber;
+            }
             //System.err.println("  lineSet = "+lineSet+"date = 
"+lineSet.getDate());
             try {
                 lineSet.getOriginal(0); // To assure, that the set is 
updated.
@@ -264,7 +266,9 @@
 
     Line.Set getLineSet (String url, Object timeStamp) {
         DataObject dataObject = getDataObject (url);
-        if (dataObject == null) return null;
+        if (dataObject == null) {
+            return null;
+        }
         
         if (timeStamp != null) {
             // get original
@@ -272,29 +276,36 @@
                 Registry registry = timeStampToRegistry.get (timeStamp);
                 if (registry != null) {
                     Line.Set ls = registry.getLineSet (dataObject);
-                    if (ls != null) return ls;
+                    if (ls != null) {
+                        return ls;
+                    }
                 }
             }
         }
         
         // get current
         LineCookie lineCookie = 
dataObject.getLookup().lookup(LineCookie.class);
-        if (lineCookie == null) return null;
+        if (lineCookie == null) {
+            return null;
+        }
         return lineCookie.getLineSet ();
     }
 
     Line getLine (String url, int lineNumber, Object timeStamp) {
         //System.err.println("LineTranslations.getLine("+lineNumber+", 
"+timeStamp+")");
         Line.Set ls = getLineSet (url, timeStamp);
-        if (ls == null) return null;
+        if (ls == null) {
+            return null;
+        }
         try {
             //System.err.println("  Line.Set = "+ls+", date = 
"+ls.getDate());
             //System.err.println("  current("+(lineNumber-1)+") = 
"+ls.getCurrent (lineNumber - 1));
             //System.err.println("  originl("+(lineNumber-1)+") = 
"+ls.getOriginal (lineNumber - 1));
-            if (timeStamp == null)
+            if (timeStamp == null) {
                 return ls.getCurrent (lineNumber - 1);
-            else
+            } else {
                 return ls.getOriginal (lineNumber - 1);
+            }
         } catch (IndexOutOfBoundsException e) {
         } catch (IllegalArgumentException e) {
         }
@@ -340,7 +351,9 @@
             return null;
         }
 
-        if (file == null) return null;
+        if (file == null) {
+            return null;
+        }
         try {
             return DataObject.find (file);
         } catch (DataObjectNotFoundException ex) {
@@ -357,7 +370,9 @@
         
         synchronized void register (DataObject dataObject) {
             LineCookie lc = dataObject.getLookup().lookup (LineCookie.class);
-            if (lc == null) return;
+            if (lc == null) {
+                return;
+            }
             dataObjectToLineSet.put (dataObject, lc.getLineSet ());
         }
         
@@ -410,7 +425,9 @@
         
         public synchronized void attach() throws IOException {
             LineCookie lc = dataObject.getLookup().lookup (LineCookie.class);
-            if (lc == null) return ;
+            if (lc == null) {
+                return ;
+            }
             lb.addPropertyChangeListener(this);
             try {
                 this.line = lc.getLineSet().getCurrent(lb.getLineNumber() - 
1);
@@ -509,7 +526,9 @@
                     DataObject dobj;
                     synchronized (this) {
                         line.removePropertyChangeListener(this);
-                        if (dataObject == null) return ;
+                        if (dataObject == null) {
+                            return ;
+                        }
                         dobj = dataObject;
                     }
                     LineCookie lc = dobj.getLookup().lookup 
(LineCookie.class);
@@ -539,7 +558,9 @@
                 DataObject dobj;
                 synchronized (this) {
                     line.removePropertyChangeListener(this);
-                    if (dataObject == null) return ;
+                    if (dataObject == null) {
+                        return ;
+                    }
                     dobj = dataObject;
                 }
                 Line newLine;
diff --git 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/MainProjectManager.java
 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/MainProjectManager.java
--- 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/MainProjectManager.java
+++ 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/MainProjectManager.java
@@ -64,7 +64,6 @@
 import org.netbeans.api.project.ui.OpenProjects;
 import org.netbeans.spi.project.ui.support.ProjectActionPerformer;
 import org.netbeans.spi.project.ui.support.ProjectSensitiveActions;
-import org.openide.filesystems.FileStateInvalidException;
 import org.openide.util.Exceptions;
 
 /**
@@ -188,10 +187,8 @@
         for (SourceGroup sg : sgs) {
             URL root;
             try {
-                root = sg.getRootFolder().getURL();
+                root = sg.getRootFolder().toURL();
                 projectRoots.add(root);
-            } catch (FileStateInvalidException fsiex) {
-                continue;
             } catch (NullPointerException npe) {
                 // http://www.netbeans.org/issues/show_bug.cgi?id=148076
                 if (sg == null) {
@@ -217,7 +214,7 @@
         //System.err.println("MainProjectManager.propertyChange("+evt+") 
name = "+evt.getPropertyName());
         if 
(OpenProjects.PROPERTY_MAIN_PROJECT.equals(evt.getPropertyName())) {
             Project theMainProject = 
OpenProjects.getDefault().getMainProject();
-            Project old = theMainProject;
+            Project old;
             synchronized (this) {
                 isMainProject = theMainProject != null;
                 old = currentProject.get();
diff --git 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcePathProviderImpl.java
 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcePathProviderImpl.java
--- 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcePathProviderImpl.java
+++ 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcePathProviderImpl.java
@@ -160,8 +160,9 @@
             baseDir = (File) properties.get("baseDir");
             smartSteppingSourcePath = (ClassPath) properties.get 
("sourcepath");
             ClassPath jdkCP = (ClassPath) properties.get ("jdksources");
-            if ( (jdkCP == null) && (JavaPlatform.getDefault () != null) )
+            if ( (jdkCP == null) && (JavaPlatform.getDefault () != null) ) {
                 jdkCP = JavaPlatform.getDefault ().getSourceFolders ();
+            }
             platformSourceRoots = getSourceRootsSet(jdkCP);
             ClassPath additionalClassPath;
             if (baseDir != null) {
@@ -356,7 +357,7 @@
 
                 projectSourceRoots = getSourceRoots(originalSourcePath);
 
-                srcRootsToListenForArtifactsUpdates = new 
HashSet(allSourceRoots);
+                srcRootsToListenForArtifactsUpdates = new 
HashSet<FileObject>(allSourceRoots);
 
                 smartSteppingSourcePath = originalSourcePath;
 
@@ -732,9 +733,12 @@
         if (relativePath == null) {
             // fallback to FileObject's class path
             ClassPath cp = ClassPath.getClassPath (fo, ClassPath.SOURCE);
-            if (cp == null)
+            if (cp == null) {
                 cp = ClassPath.getClassPath (fo, ClassPath.COMPILE);
-            if (cp == null) return null;
+            }
+            if (cp == null) {
+                return null;
+            }
             relativePath = cp.getResourceName (
                 fo, 
                 directorySeparator,
@@ -830,7 +834,7 @@
     }
 
     synchronized Set<FileObject> getSourceRootsFO() {
-        return new 
HashSet(Arrays.asList(smartSteppingSourcePath.getRoots()));
+        return new 
HashSet<FileObject>(Arrays.asList(smartSteppingSourcePath.getRoots()));
     }
     
     /**
@@ -1079,7 +1083,7 @@
                         sourcePath.toArray(new FileObject[0]));
             newCP_ptr[0] = smartSteppingSourcePath;
         }
-        Set<FileObject> disabledRoots = new HashSet(sourcePathOriginal);
+        Set<FileObject> disabledRoots = new 
HashSet<FileObject>(sourcePathOriginal);
         disabledRoots.removeAll(sourcePath);
         Set<String> disabledSourceRoots = new HashSet<String>();
         for (FileObject fo : disabledRoots) {
@@ -1432,7 +1436,7 @@
                     }
                     return ;
                 }
-                Map<String, FileObject> classes = new HashMap();
+                Map<String, FileObject> classes = new HashMap<String, 
FileObject>();
                 for (File f : artifacts) {
                     FileObject fo = FileUtil.toFileObject(f);
                     if (fo != null) {
@@ -1549,7 +1553,9 @@
             boolean changed = false;
             if (added != null && added.size() > 0) {
                 synchronized (SourcePathProviderImpl.this) {
-                    if (originalSourcePath == null) return ;
+                    if (originalSourcePath == null) {
+                        return ;
+                    }
                     List<URL> sourcePaths = getURLRoots(originalSourcePath);
                     sourcePaths.addAll(added);
                     originalSourcePath =
@@ -1566,7 +1572,9 @@
             }
             if (removed != null && removed.size() > 0) {
                 synchronized (SourcePathProviderImpl.this) {
-                    if (originalSourcePath == null) return ;
+                    if (originalSourcePath == null) {
+                        return ;
+                    }
                     List<URL> sourcePaths = getURLRoots(originalSourcePath);
                     sourcePaths.removeAll(removed);
                     originalSourcePath =
@@ -1610,7 +1618,9 @@
                 getInstalledPlatforms ();
             boolean changed = false;
             synchronized (SourcePathProviderImpl.this) {
-                if (originalSourcePath == null) return ;
+                if (originalSourcePath == null) {
+                    return ;
+                }
                 platformSourceRoots.clear();
                 List<FileObject> sourcePaths = new ArrayList<FileObject>(
                         Arrays.asList(originalSourcePath.getRoots()));
diff --git 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcesCurrentModel.java
 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcesCurrentModel.java
--- 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcesCurrentModel.java
+++ 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcesCurrentModel.java
@@ -73,19 +73,15 @@
 import org.netbeans.spi.debugger.DebuggerServiceRegistration;
 import org.netbeans.spi.debugger.jpda.SourcePathProvider;
 import org.netbeans.spi.debugger.ui.EditorContextDispatcher;
-import org.netbeans.spi.viewmodel.CheckNodeModel;
 import org.netbeans.spi.viewmodel.CheckNodeModelFilter;
 import org.netbeans.spi.viewmodel.ModelEvent;
 import org.netbeans.spi.viewmodel.Models;
 import org.netbeans.spi.viewmodel.NodeActionsProvider;
 import org.netbeans.spi.viewmodel.NodeModel;
-import org.netbeans.spi.viewmodel.TableModel;
 import org.netbeans.spi.viewmodel.TreeModel;
 import org.netbeans.spi.viewmodel.ModelListener;
 import org.netbeans.spi.viewmodel.UnknownTypeException;
-import org.openide.DialogDisplayer;
 import org.openide.ErrorManager;
-import org.openide.NotifyDescriptor;
 import org.openide.filesystems.FileObject;
 import org.openide.filesystems.FileStateInvalidException;
 import org.openide.filesystems.FileUtil;
@@ -104,7 +100,7 @@
 public class SourcesCurrentModel implements TreeModel, CheckNodeModelFilter,
 NodeActionsProvider {
 
-    private static Logger logger = 
Logger.getLogger(SourcesCurrentModel.class.getName());
+    private static final Logger logger = 
Logger.getLogger(SourcesCurrentModel.class.getName());
 
     private Vector<ModelListener>   listeners = new Vector<ModelListener>();
     // set of filters
@@ -153,7 +149,7 @@
                             }
                         }
                     }
-                    synchronized (this) {
+                    synchronized (SourcesCurrentModel.this) {
                         currentSourcePathProvider = spImpl;
                     }
                     fireTreeChanged();
@@ -191,6 +187,7 @@
      *
      * @return threads contained in this group of threads
      */
+    @Override
     public Object getRoot () {
         return ROOT;
     }
@@ -199,6 +196,7 @@
      *
      * @return threads contained in this group of threads
      */
+    @Override
     public Object[] getChildren (Object parent, int from, int to)
     throws UnknownTypeException {
         if (parent == ROOT) {
@@ -214,6 +212,7 @@
             // 1) get source roots
             if (mainProjectListener == null) {
                 mainProjectListener = new PropertyChangeListener() {
+                    @Override
                     public void propertyChange(PropertyChangeEvent evt) {
                         fireTreeChanged();
                     }
@@ -231,10 +230,7 @@
                 for (int i = 0; i < sourceRoots.length; i++) {
                     sourceRoots[i] = 
SourcePathProviderImpl.getRoot(projectSources.get(i));
                 }
-                try {
-                    root = p.getProjectDirectory().getURL().toExternalForm();
-                } catch (FileStateInvalidException ex) {
-                }
+                root = p.getProjectDirectory().toURL().toExternalForm();
             } else {
                 sourceRoots = new String[] {};
             }
@@ -290,19 +286,24 @@
                 this.sourcePathPermutation = sourcePathPermutation;
             }
             return fos;
-        } else
+        } else {
         throw new UnknownTypeException (parent);
     }
+    }
 
     private List<String> loadAdditionalSourceRoots(String projectRoot) {
-        if (projectRoot == null) return null;
+        if (projectRoot == null) {
+            return null;
+        }
         return (List<String>) 
sourcesProperties.getProperties("additional_source_roots").
                 getMap("project", Collections.emptyMap()).
                 get(projectRoot);
     }
 
     private Set<String> loadDisabledSourceRoots(String projectRoot) {
-        if (projectRoot == null) return null;
+        if (projectRoot == null) {
+            return null;
+        }
         return (Set<String>) sourcesProperties.getProperties("source_roots").
                 getMap("project_disabled", Collections.emptyMap()).
                 get(projectRoot);
@@ -346,17 +347,13 @@
                 continue;
             }
             addedBinaryRoots.add(fo);
-            try {
-                FileObject[] roots = 
SourceForBinaryQuery.findSourceRoots(fo.getURL()).getRoots();
+            FileObject[] roots = 
SourceForBinaryQuery.findSourceRoots(fo.toURL()).getRoots();
                 for (FileObject fr : roots) {
                     if (!preferredRoots.contains(fr)) {
                         allSourceRoots.add(fr);
                         preferredRoots.add(fr);
                     }
                 }
-            } catch (FileStateInvalidException ex) {
-                Exceptions.printStackTrace(ex);
-            }
         }
     }
 
@@ -381,26 +378,35 @@
      *
      * @return  true if node is leaf
      */
+    @Override
     public int getChildrenCount (Object node) throws UnknownTypeException {
         if (node == ROOT) {
             // Performance, see issue #59058.
             return Integer.MAX_VALUE;
             //return sourcePath.getOriginalSourceRoots ().length +
             //    filters.size ();
-        } else
+        } else {
+            throw new UnknownTypeException (node);
+        }
+    }
+
+    @Override
+    public boolean isLeaf (Object node) throws UnknownTypeException {
+        if (node == ROOT) {
+            return false;
+        }
+        if (node instanceof String) {
+            return true;
+        }
         throw new UnknownTypeException (node);
     }
 
-    public boolean isLeaf (Object node) throws UnknownTypeException {
-        if (node == ROOT) return false;
-        if (node instanceof String) return true;
-        throw new UnknownTypeException (node);
-    }
-
+    @Override
     public void addModelListener (ModelListener l) {
         listeners.add (l);
     }
 
+    @Override
     public void removeModelListener (ModelListener l) {
         listeners.remove (l);
     }
@@ -408,21 +414,24 @@
     public void fireTreeChanged () {
         Vector v = (Vector) listeners.clone ();
         int i, k = v.size ();
-        for (i = 0; i < k; i++)
+        for (i = 0; i < k; i++) {
             ((ModelListener) v.get (i)).modelChanged (null);
     }
+    }
 
     private void fireSelectedNodes(Object[] nodes) {
         ModelEvent event = new ModelEvent.SelectionChanged(this, nodes);
         Vector v = (Vector) listeners.clone ();
         int i, k = v.size ();
-        for (i = 0; i < k; i++)
+        for (i = 0; i < k; i++) {
             ((ModelListener) v.get (i)).modelChanged (event);
     }
+    }
 
 
     // NodeActionsProvider 
.....................................................
 
+    @Override
     public Action[] getActions (Object node) throws UnknownTypeException {
         if (node instanceof String) {
             if (additionalSourceRoots.contains((String) node)) {
@@ -445,17 +454,18 @@
                     RESET_ORDER_ACTION,
                 };
             }
-        } else
+        } else {
         throw new UnknownTypeException (node);
     }
+    }
 
+    @Override
     public void performDefaultAction (Object node)
     throws UnknownTypeException {
-        if (node instanceof String) {
-            return;
-        } else
+        if (!(node instanceof String)) {
         throw new UnknownTypeException (node);
     }
+    }
 
     // other methods 
...........................................................
 
@@ -516,14 +526,17 @@
 
     // CheckNodeModelFilter
     
+    @Override
     public boolean isCheckable(NodeModel original, Object node) throws 
UnknownTypeException {
         return true;
     }
 
+    @Override
     public boolean isCheckEnabled(NodeModel original, Object node) throws 
UnknownTypeException {
         return true;
     }
 
+    @Override
     public Boolean isSelected(NodeModel original, Object node) throws 
UnknownTypeException {
         if (node instanceof String) {
             return isEnabled ((String) node);
@@ -532,6 +545,7 @@
         }
     }
 
+    @Override
     public void setSelected(NodeModel original, Object node, Boolean 
selected) throws UnknownTypeException {
         if (node instanceof String) {
             setEnabled ((String) node, selected.booleanValue ());
@@ -540,14 +554,17 @@
         throw new UnknownTypeException (node);
     }
 
+    @Override
     public String getDisplayName(NodeModel original, Object node) throws 
UnknownTypeException {
         return original.getDisplayName(node);
     }
 
+    @Override
     public String getIconBase(NodeModel original, Object node) throws 
UnknownTypeException {
         return original.getIconBase(node);
     }
 
+    @Override
     public String getShortDescription(NodeModel original, Object node) 
throws UnknownTypeException {
         return original.getShortDescription(node);
     }
@@ -630,16 +647,19 @@
 
     private final Action NEW_SOURCE_ROOT_ACTION = new AbstractAction(
             NbBundle.getMessage(SourcesCurrentModel.class, 
"CTL_SourcesModel_Action_AddSrc")) {
+        @Override
         public void actionPerformed (ActionEvent e) {
             if (newSourceFileChooser == null) {
                 newSourceFileChooser = new JFileChooser();
                 
newSourceFileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
                 newSourceFileChooser.setFileFilter(new FileFilter() {
 
+                    @Override
                     public String getDescription() {
                         return 
NbBundle.getMessage(SourcesCurrentModel.class, 
"CTL_SourcesModel_AddSrc_Chooser_Filter_Description");
                     }
 
+                    @Override
                     public boolean accept(File file) {
                         if (file.isDirectory()) {
                             return true;
@@ -700,12 +720,14 @@
     };
 
     private final Action DELETE_ACTION = Models.createAction (
-        NbBundle.getBundle (SourcesCurrentModel.class).getString
-            ("CTL_SourcesModel_Action_Delete"),
+        NbBundle.getMessage
+            (SourcesCurrentModel.class, "CTL_SourcesModel_Action_Delete"),
         new Models.ActionPerformer () {
+            @Override
             public boolean isEnabled (Object node) {
                 return true;
             }
+            @Override
             public void perform (Object[] nodes) {
                 int i, k = nodes.length;
                 synchronized (SourcesCurrentModel.this) {
@@ -769,15 +791,19 @@
     );
 
     private final Action MOVE_UP_ACTION = Models.createAction (
-        NbBundle.getBundle (SourcesCurrentModel.class).getString
-            ("CTL_SourcesModel_MoveUpSrc"),
+        NbBundle.getMessage
+            (SourcesCurrentModel.class, "CTL_SourcesModel_MoveUpSrc"),
         new Models.ActionPerformer () {
+            @Override
             public boolean isEnabled (Object node) {
-                if (ROOT.equals(node)) return false;
+                if (ROOT.equals(node)) {
+                    return false;
+                }
                 synchronized (SourcesCurrentModel.this) {
                     return sortedOriginalSourceRoots.length > 0 && 
!sortedOriginalSourceRoots[0].equals(node);
                 }
             }
+            @Override
             public void perform (Object[] nodes) {
                 int k = nodes.length;
                 synchronized (SourcesCurrentModel.this) {
@@ -816,16 +842,20 @@
     );
 
     private final Action MOVE_DOWN_ACTION = Models.createAction (
-        NbBundle.getBundle (SourcesCurrentModel.class).getString
-            ("CTL_SourcesModel_MoveDownSrc"),
+        NbBundle.getMessage
+            (SourcesCurrentModel.class, "CTL_SourcesModel_MoveDownSrc"),
         new Models.ActionPerformer () {
+            @Override
             public boolean isEnabled (Object node) {
-                if (ROOT.equals(node)) return false;
+                if (ROOT.equals(node)) {
+                    return false;
+                }
                 synchronized (SourcesCurrentModel.this) {
                     return sortedOriginalSourceRoots.length > 0 &&
                            
!sortedOriginalSourceRoots[sortedOriginalSourceRoots.length - 1].equals(node);
                 }
             }
+            @Override
             public void perform (Object[] nodes) {
                 int k = nodes.length;
                 synchronized (SourcesCurrentModel.this) {
@@ -864,12 +894,14 @@
     );
 
     private final Action RESET_ORDER_ACTION = Models.createAction (
-        NbBundle.getBundle (SourcesCurrentModel.class).getString
-            ("CTL_SourcesModel_ResetOrderSrc"),
+        NbBundle.getMessage
+            (SourcesCurrentModel.class, "CTL_SourcesModel_ResetOrderSrc"),
         new Models.ActionPerformer () {
+            @Override
             public boolean isEnabled (Object node) {
                 return true;
             }
+            @Override
             public void perform (Object[] nodes) {
                 if (currentSourcePathProvider != null) {
                     
currentSourcePathProvider.reorderOriginalSourceRoots(null);
diff --git 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcesNodeModel.java
 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcesNodeModel.java
--- 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcesNodeModel.java
+++ 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcesNodeModel.java
@@ -45,7 +45,6 @@
 package org.netbeans.modules.debugger.jpda.projects;
 
 import java.io.File;
-import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
diff --git 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcesRemoteModel.java
 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcesRemoteModel.java
--- 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcesRemoteModel.java
+++ 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcesRemoteModel.java
@@ -45,10 +45,7 @@
 package org.netbeans.modules.debugger.jpda.projects;
 
 import java.awt.event.ActionEvent;
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
 import java.io.File;
-import java.lang.ref.WeakReference;
 import java.net.MalformedURLException;
 import java.util.*;
 import java.util.logging.Level;
@@ -63,29 +60,18 @@
 import org.netbeans.api.java.classpath.GlobalPathRegistry;
 import org.netbeans.api.java.classpath.GlobalPathRegistryEvent;
 import org.netbeans.api.java.classpath.GlobalPathRegistryListener;
-import org.netbeans.api.java.project.JavaProjectConstants;
-import org.netbeans.api.project.Project;
-import org.netbeans.api.project.ProjectUtils;
-import org.netbeans.api.project.SourceGroup;
-import org.netbeans.api.project.Sources;
 import 
org.netbeans.modules.debugger.jpda.projects.SourcePathProviderImpl.FileObjectComparator;
 import org.netbeans.spi.debugger.DebuggerServiceRegistration;
-import org.netbeans.spi.viewmodel.CheckNodeModel;
 import org.netbeans.spi.viewmodel.CheckNodeModelFilter;
-import org.netbeans.spi.viewmodel.ColumnModel;
 import org.netbeans.spi.viewmodel.ModelEvent;
 import org.netbeans.spi.viewmodel.Models;
 import org.netbeans.spi.viewmodel.NodeActionsProvider;
-import org.netbeans.spi.viewmodel.TableModel;
 import org.netbeans.spi.viewmodel.TreeModel;
 import org.netbeans.spi.viewmodel.ModelListener;
 import org.netbeans.spi.viewmodel.NodeModel;
 import org.netbeans.spi.viewmodel.UnknownTypeException;
-import org.openide.DialogDisplayer;
 import org.openide.ErrorManager;
-import org.openide.NotifyDescriptor;
 import org.openide.filesystems.FileObject;
-import org.openide.filesystems.FileStateInvalidException;
 import org.openide.filesystems.FileUtil;
 import org.openide.util.Exceptions;
 import org.openide.util.NbBundle;
@@ -102,7 +88,7 @@
 public class SourcesRemoteModel implements TreeModel, CheckNodeModelFilter,
 NodeActionsProvider {
 
-    private static Logger logger = 
Logger.getLogger(SourcesCurrentModel.class.getName());
+    private static final Logger logger = 
Logger.getLogger(SourcesCurrentModel.class.getName());
 
     private Vector<ModelListener>   listeners = new Vector<ModelListener>();
     // set of filters
@@ -135,6 +121,7 @@
      *
      * @return threads contained in this group of threads
      */
+    @Override
     public Object getRoot () {
         return ROOT;
     }
@@ -143,16 +130,19 @@
      *
      * @return threads contained in this group of threads
      */
+    @Override
     public Object[] getChildren (Object parent, int from, int to)
     throws UnknownTypeException {
         if (parent == ROOT) {
             // 1) get source roots
             if (globalRegistryListener == null) {
                 globalRegistryListener = new GlobalPathRegistryListener() {
+                    @Override
                     public void pathsAdded(GlobalPathRegistryEvent event) {
                         fireTreeChanged();
                     }
 
+                    @Override
                     public void pathsRemoved(GlobalPathRegistryEvent event) {
                         fireTreeChanged();
                     }
@@ -215,9 +205,10 @@
                 this.sourcePathPermutation = sourcePathPermutation;
             }
             return fos;
-        } else
+        } else {
         throw new UnknownTypeException (parent);
     }
+    }
 
     /**
      * Returns number of children for given node.
@@ -228,26 +219,35 @@
      *
      * @return  true if node is leaf
      */
+    @Override
     public int getChildrenCount (Object node) throws UnknownTypeException {
         if (node == ROOT) {
             // Performance, see issue #59058.
             return Integer.MAX_VALUE;
             //return sourcePath.getOriginalSourceRoots ().length +
             //    filters.size ();
-        } else
+        } else {
+            throw new UnknownTypeException (node);
+        }
+    }
+
+    @Override
+    public boolean isLeaf (Object node) throws UnknownTypeException {
+        if (node == ROOT) {
+            return false;
+        }
+        if (node instanceof String) {
+            return true;
+        }
         throw new UnknownTypeException (node);
     }
 
-    public boolean isLeaf (Object node) throws UnknownTypeException {
-        if (node == ROOT) return false;
-        if (node instanceof String) return true;
-        throw new UnknownTypeException (node);
-    }
-
+    @Override
     public void addModelListener (ModelListener l) {
         listeners.add (l);
     }
 
+    @Override
     public void removeModelListener (ModelListener l) {
         listeners.remove (l);
     }
@@ -255,21 +255,24 @@
     public void fireTreeChanged () {
         Vector v = (Vector) listeners.clone ();
         int i, k = v.size ();
-        for (i = 0; i < k; i++)
+        for (i = 0; i < k; i++) {
             ((ModelListener) v.get (i)).modelChanged (null);
     }
+    }
 
     private void fireSelectedNodes(Object[] nodes) {
         ModelEvent event = new ModelEvent.SelectionChanged(this, nodes);
         Vector v = (Vector) listeners.clone ();
         int i, k = v.size ();
-        for (i = 0; i < k; i++)
+        for (i = 0; i < k; i++) {
             ((ModelListener) v.get (i)).modelChanged (event);
     }
+    }
 
 
     // NodeActionsProvider 
.....................................................
 
+    @Override
     public Action[] getActions (Object node) throws UnknownTypeException {
         if (node instanceof String) {
             if (additionalSourceRoots.contains((String) node)) {
@@ -292,17 +295,18 @@
                     RESET_ORDER_ACTION,
                 };
             }
-        } else
+        } else {
         throw new UnknownTypeException (node);
     }
+    }
 
+    @Override
     public void performDefaultAction (Object node)
     throws UnknownTypeException {
-        if (node instanceof String) {
-            return;
-        } else
+        if (!(node instanceof String)) {
         throw new UnknownTypeException (node);
     }
+    }
 
     // other methods 
...........................................................
 
@@ -355,13 +359,13 @@
      */
 
     private void loadSourceRoots() {
-        disabledSourceRoots = new HashSet (
+        disabledSourceRoots = new HashSet<String> (
             sourcesProperties.getProperties ("source_roots").getCollection (
                 "remote_disabled",
                 Collections.EMPTY_SET
             )
         );
-        additionalSourceRoots = new ArrayList(
+        additionalSourceRoots = new ArrayList<String>(
             
sourcesProperties.getProperties("additional_source_roots").getCollection(
                 "src_roots",
                 Collections.EMPTY_LIST)
@@ -388,14 +392,17 @@
 
     // CheckNodeModelFilter
 
+    @Override
     public boolean isCheckable(NodeModel original, Object node) throws 
UnknownTypeException {
         return true;
     }
 
+    @Override
     public boolean isCheckEnabled(NodeModel original, Object node) throws 
UnknownTypeException {
         return true;
     }
 
+    @Override
     public Boolean isSelected(NodeModel original, Object node) throws 
UnknownTypeException {
         if (node instanceof String) {
             return isEnabled ((String) node);
@@ -404,6 +411,7 @@
         }
     }
 
+    @Override
     public void setSelected(NodeModel original, Object node, Boolean 
selected) throws UnknownTypeException {
         if (node instanceof String) {
             setEnabled ((String) node, selected.booleanValue ());
@@ -412,14 +420,17 @@
         throw new UnknownTypeException (node);
     }
 
+    @Override
     public String getDisplayName(NodeModel original, Object node) throws 
UnknownTypeException {
         return original.getDisplayName(node);
     }
 
+    @Override
     public String getIconBase(NodeModel original, Object node) throws 
UnknownTypeException {
         return original.getIconBase(node);
     }
 
+    @Override
     public String getShortDescription(NodeModel original, Object node) 
throws UnknownTypeException {
         return original.getShortDescription(node);
     }
@@ -487,16 +498,19 @@
 
     private final Action NEW_SOURCE_ROOT_ACTION = new AbstractAction(
             NbBundle.getMessage(SourcesRemoteModel.class, 
"CTL_SourcesModel_Action_AddSrc")) {
+        @Override
         public void actionPerformed (ActionEvent e) {
             if (newSourceFileChooser == null) {
                 newSourceFileChooser = new JFileChooser();
                 
newSourceFileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
                 newSourceFileChooser.setFileFilter(new FileFilter() {
 
+                    @Override
                     public String getDescription() {
                         return NbBundle.getMessage(SourcesRemoteModel.class, 
"CTL_SourcesModel_AddSrc_Chooser_Filter_Description");
                     }
 
+                    @Override
                     public boolean accept(File file) {
                         if (file.isDirectory()) {
                             return true;
@@ -557,12 +571,14 @@
     };
 
     private final Action DELETE_ACTION = Models.createAction (
-        NbBundle.getBundle (SourcesRemoteModel.class).getString
-            ("CTL_SourcesModel_Action_Delete"),
+        NbBundle.getMessage
+            (SourcesRemoteModel.class, "CTL_SourcesModel_Action_Delete"),
         new Models.ActionPerformer () {
+            @Override
             public boolean isEnabled (Object node) {
                 return true;
             }
+            @Override
             public void perform (Object[] nodes) {
                 int i, k = nodes.length;
                 for (i = 0; i < k; i++) {
@@ -627,15 +643,19 @@
     );
 
     private final Action MOVE_UP_ACTION = Models.createAction (
-        NbBundle.getBundle (SourcesRemoteModel.class).getString
-            ("CTL_SourcesModel_MoveUpSrc"),
+        NbBundle.getMessage
+            (SourcesRemoteModel.class, "CTL_SourcesModel_MoveUpSrc"),
         new Models.ActionPerformer () {
+            @Override
             public boolean isEnabled (Object node) {
-                if (ROOT.equals(node)) return false;
+                if (ROOT.equals(node)) {
+                    return false;
+                }
                 synchronized (SourcesRemoteModel.this) {
                     return sortedOriginalSourceRoots.length > 0 && 
!sortedOriginalSourceRoots[0].equals(node);
                 }
             }
+            @Override
             public void perform (Object[] nodes) {
                 int k = nodes.length;
                 synchronized (SourcesRemoteModel.this) {
@@ -670,16 +690,20 @@
     );
 
     private final Action MOVE_DOWN_ACTION = Models.createAction (
-        NbBundle.getBundle (SourcesCurrentModel.class).getString
-            ("CTL_SourcesModel_MoveDownSrc"),
+        NbBundle.getMessage
+            (SourcesCurrentModel.class, "CTL_SourcesModel_MoveDownSrc"),
         new Models.ActionPerformer () {
+            @Override
             public boolean isEnabled (Object node) {
-                if (ROOT.equals(node)) return false;
+                if (ROOT.equals(node)) {
+                    return false;
+                }
                 synchronized (SourcesRemoteModel.this) {
                     return sortedOriginalSourceRoots.length > 0 &&
                            
!sortedOriginalSourceRoots[sortedOriginalSourceRoots.length - 1].equals(node);
                 }
             }
+            @Override
             public void perform (Object[] nodes) {
                 int k = nodes.length;
                 synchronized (SourcesRemoteModel.this) {
@@ -714,12 +738,14 @@
     );
 
     private final Action RESET_ORDER_ACTION = Models.createAction (
-        NbBundle.getBundle (SourcesCurrentModel.class).getString
-            ("CTL_SourcesModel_ResetOrderSrc"),
+        NbBundle.getMessage
+            (SourcesCurrentModel.class, "CTL_SourcesModel_ResetOrderSrc"),
         new Models.ActionPerformer () {
+            @Override
             public boolean isEnabled (Object node) {
                 return true;
             }
+            @Override
             public void perform (Object[] nodes) {
                 reorderOriginalSourceRoots(null);
                 //saveFilters ();
diff --git 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcesTabs.java
 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcesTabs.java
--- 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcesTabs.java
+++ 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/SourcesTabs.java
@@ -68,6 +68,7 @@
     public SourcesTabs() {
         initComponent();
         mainProjectListener = new PropertyChangeListener() {
+            @Override
             public void propertyChange(PropertyChangeEvent evt) {
                 Project p = MainProjectManager.getDefault().getMainProject();
                 setProjectTitle(p);
diff --git 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/StepIntoActionProvider.java
 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/StepIntoActionProvider.java
--- 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/StepIntoActionProvider.java
+++ 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/StepIntoActionProvider.java
@@ -60,13 +60,11 @@
 import org.netbeans.api.debugger.DebuggerManagerListener;
 import org.netbeans.api.debugger.Session;
 import org.netbeans.api.debugger.Watch;
-import org.netbeans.api.debugger.jpda.MethodBreakpoint;
 import org.netbeans.api.project.Project;
 import org.netbeans.spi.debugger.ActionsProvider;
 import org.netbeans.spi.debugger.ActionsProviderSupport;
 import org.netbeans.spi.project.ActionProvider;
 import org.openide.ErrorManager;
-import org.openide.util.Lookup;
 import org.openide.util.WeakListeners;
 
 
@@ -93,15 +91,18 @@
         );
     }
     
+    @Override
     public Set getActions () {
         return Collections.singleton (ActionsManager.ACTION_STEP_INTO);
     }
     
+    @Override
     public void doAction (final Object action) {
         // start debugging of project
         if (!SwingUtilities.isEventDispatchThread()) {
             try {
                 SwingUtilities.invokeAndWait(new Runnable() {
+                    @Override
                     public void run() {
                         invokeAction();
                     }
@@ -116,6 +117,7 @@
         }
     }
     
+    @Override
     public void postAction(Object action, Runnable actionPerformedNotifier) {
         // start debugging of project
         invokeAction();
@@ -147,15 +149,23 @@
         
         // check if current project supports this action
         Project p = MainProjectManager.getDefault ().getMainProject ();
-        if (p == null) return false;
+        if (p == null) {
+            return false;
+        }
         ActionProvider actionProvider = 
p.getLookup().lookup(ActionProvider.class);
-        if (actionProvider == null) return false;
+        if (actionProvider == null) {
+            return false;
+        }
         String[] sa = actionProvider.getSupportedActions ();
         int i, k = sa.length;
-        for (i = 0; i < k; i++)
-            if (ActionProvider.COMMAND_DEBUG_STEP_INTO.equals (sa [i]))
+        for (i = 0; i < k; i++) {
+            if (ActionProvider.COMMAND_DEBUG_STEP_INTO.equals (sa [i])) {
                 break;
-        if (i == k) return false;
+            }
+        }
+        if (i == k) {
+            return false;
+        }
         
         if (DebuggerManager.getDebuggerManager().getDebuggerEngines().length 
> 0) {
             // Do not enable this non-contextual action when some debugging 
session is already running.
@@ -171,26 +181,37 @@
     
     private class Listener implements PropertyChangeListener, 
DebuggerManagerListener {
         
+        @Override
         public void propertyChange (PropertyChangeEvent e) {
             if (e.getSource() instanceof MainProjectManager) {
                 doSetEnabled();
             }
         }
         
+        @Override
         public void sessionRemoved (Session session) {}
+        @Override
         public void breakpointAdded (Breakpoint breakpoint) {}
+        @Override
         public void breakpointRemoved (Breakpoint breakpoint) {}
+        @Override
         public Breakpoint[] initBreakpoints () {
             return new Breakpoint [0];
         }
+        @Override
         public void initWatches () {}
+        @Override
         public void sessionAdded (Session session) {}
+        @Override
         public void watchAdded (Watch watch) {}
+        @Override
         public void watchRemoved (Watch watch) {}
         
+        @Override
         public void engineAdded(DebuggerEngine engine) {
             doSetEnabled();
         }
+        @Override
         public void engineRemoved(DebuggerEngine engine) {
             doSetEnabled();
         }
diff --git 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ToolTipAnnotation.java
 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ToolTipAnnotation.java
--- 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ToolTipAnnotation.java
+++ 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ToolTipAnnotation.java
@@ -46,7 +46,6 @@
 
 import com.sun.source.tree.CompilationUnitTree;
 import com.sun.source.tree.Tree;
-import com.sun.source.tree.VariableTree;
 import com.sun.source.util.SourcePositions;
 import com.sun.source.util.TreePath;
 import java.awt.event.ActionEvent;
@@ -104,7 +103,6 @@
 import org.netbeans.spi.debugger.jpda.EditorContext.Operation;
 
 import org.netbeans.spi.debugger.ui.EditorContextDispatcher;
-import org.openide.util.Exceptions;
 
 
 public class ToolTipAnnotation extends Annotation implements Runnable {
@@ -125,6 +123,7 @@
     private Part lp;
     private EditorCookie ec;
 
+    @Override
     public String getShortDescription () {
         // [TODO] hack for 
org.netbeans.modules.debugger.jpda.actions.MethodChooser that disables 
tooltips
         if 
("true".equals(System.getProperty("org.netbeans.modules.debugger.jpda.doNotShowTooltips")))
 { // NOI18N
@@ -132,19 +131,28 @@
         }
         DebuggerEngine currentEngine = DebuggerManager.getDebuggerManager ().
             getCurrentEngine ();
-        if (currentEngine == null) return null;
+        if (currentEngine == null) {
+            return null;
+        }
         JPDADebugger d = currentEngine.lookupFirst(null, JPDADebugger.class);
-        if (d == null) return null;
+        if (d == null) {
+            return null;
+        }
 
         Part lp = (Part) getAttachedAnnotatable();
-        if (lp == null) return null;
+        if (lp == null) {
+            return null;
+        }
         Line line = lp.getLine ();
         DataObject dob = DataEditorSupport.findDataObject (line);
-        if (dob == null) return null;
-        EditorCookie ec = dob.getCookie(EditorCookie.class);
-        if (ec == null)
+        if (dob == null) {
+            return null;
+        }
+        EditorCookie ec = dob.getLookup().lookup(EditorCookie.class);
+        if (ec == null) {
             return null;
             // Only for editable dataobjects
+        }
 
         this.lp = lp;
         this.ec = ec;
@@ -157,9 +165,12 @@
         return null;
     }
 
+    @Override
     public void run () {
         ObjectVariable tooltipVariable = null;
-        if (lp == null || ec == null) return ;
+        if (lp == null || ec == null) {
+            return ;
+        }
         StyledDocument doc;
         try {
             doc = ec.openDocument();
@@ -167,14 +178,22 @@
             return ;
         }
         final JEditorPane ep = 
EditorContextDispatcher.getDefault().getMostRecentEditor ();
-        if (ep == null || ep.getDocument() != doc) return ;
+        if (ep == null || ep.getDocument() != doc) {
+            return ;
+        }
         DebuggerEngine currentEngine = DebuggerManager.getDebuggerManager ().
             getCurrentEngine ();
-        if (currentEngine == null) return;
+        if (currentEngine == null) {
+            return;
+        }
         final JPDADebugger d = currentEngine.lookupFirst(null, 
JPDADebugger.class);
-        if (d == null) return;
+        if (d == null) {
+            return;
+        }
         JPDAThread t = d.getCurrentThread();
-        if (t == null || !t.isSuspended()) return;
+        if (t == null || !t.isSuspended()) {
+            return;
+        }
 
         int offset;
         boolean[] isMethodPtr = new boolean[] { false };
@@ -188,9 +207,11 @@
             ) + lp.getColumn (),
             isMethodPtr
         );
-        if (expression == null) return;
+        if (expression == null) {
+            return;
+        }
 
-        String toolTipText = null;
+        String toolTipText;
         try {
             Variable v = null;
             List<Operation> operations = t.getLastOperations();
@@ -211,7 +232,9 @@
                 }
                 v = d.evaluate (expression);
             }
-            if (v == null) return ; // Something went wrong...
+            if (v == null) {
+                return ; // Something went wrong...
+            }
             String type = v.getType ();
             if (v instanceof ObjectVariable) {
                 tooltipVariable = (ObjectVariable) v;
@@ -249,6 +272,7 @@
             final ObjectVariable var = tooltipVariable;
             final String toolTip = toolTipText;
             SwingUtilities.invokeLater(new Runnable() {
+                @Override
                 public void run() {
                     final ToolTipView.ExpandableTooltip et = 
ToolTipView.createExpandableTooltip(toolTip);
                     et.addExpansionListener(new ActionListener() {
@@ -287,6 +311,7 @@
         }
     }
 
+    @Override
     public String getAnnotationType () {
         return null; // Currently return null annotation type
     }
@@ -302,8 +327,12 @@
         String t = null;
         if ( (ep.getSelectionStart () <= offset) &&
              (offset <= ep.getSelectionEnd ())
-        )   t = ep.getSelectedText ();
-        if (t != null) return t;
+        ) {
+            t = ep.getSelectedText ();
+        }
+        if (t != null) {
+            return t;
+        }
         int line = NbDocument.findLineNumber (
             doc,
             offset
@@ -317,7 +346,9 @@
                 NbDocument.findLineRootElement (doc).
                 getElement (line);
 
-            if (lineElem == null) return null;
+            if (lineElem == null) {
+                return null;
+            }
             int lineStartOffset = lineElem.getStartOffset ();
             int lineLen = lineElem.getEndOffset() - lineStartOffset;
             t = doc.getText (lineStartOffset, lineLen);
@@ -336,10 +367,14 @@
                 identEnd++;
             }
 
-            if (identStart == identEnd) return null;
+            if (identStart == identEnd) {
+                return null;
+            }
 
             int newOffset = NbDocument.findLineOffset(doc, line) + 
identStart + 1;
-            if (!isValidTooltipLocation(debugger, doc, newOffset)) return 
null;
+            if (!isValidTooltipLocation(debugger, doc, newOffset)) {
+                return null;
+            }
 
             String ident = t.substring (identStart, identEnd);
             if (JAVA_KEYWORDS.contains(ident)) {
@@ -369,13 +404,15 @@
 
         final boolean[] isValid = new boolean[]{true};
         final String[] className = new String[]{""};
-        Future<Void> parsingTask = null;
+        Future<Void> parsingTask;
         try {
             parsingTask = 
ParserManager.parseWhenScanFinished(Collections.singleton(Source.create(doc)),
 new UserTask() {
                 @Override
                 public void run(ResultIterator resultIterator) throws 
Exception {
                     Result res = resultIterator.getParserResult(offset);
-                    if (res == null) return;
+                    if (res == null) {
+                        return;
+                    }
                     CompilationController controller = 
CompilationController.get(res);
                     if (controller == null || 
controller.toPhase(Phase.RESOLVED).compareTo(Phase.RESOLVED) < 0) {
                         return;
@@ -410,7 +447,9 @@
                     }
                     // check whether offset is in a preceding comment
                     for (Comment comm : treeUtilities.getComments(tree, 
true)) {
-                        if (comm.pos() < 0) continue;
+                        if (comm.pos() < 0) {
+                            continue;
+                        }
                         if (comm.pos() <= offset && offset <= comm.endPos()) 
{
                             isValid[0] = false;
                             return;
@@ -418,7 +457,9 @@
                     }
                     // check whether offset is in a trailing comment
                     for (Comment comm : treeUtilities.getComments(tree, 
false)) {
-                        if (comm.pos() < 0) continue;
+                        if (comm.pos() < 0) {
+                            continue;
+                        }
                         if (comm.pos() <= offset && offset <= comm.endPos()) 
{
                             isValid[0] = false;
                             return;
@@ -445,7 +486,9 @@
             return false;
         }
         parsingTask.cancel(false); // for the case that scanning has not 
finished yet
-        if (!isValid[0]) return false;
+        if (!isValid[0]) {
+            return false;
+        }
         if (className[0].length() > 0) {
             Set<String> superTypeNames = new HashSet<String>();
             This thisVar = currentFrame.getThisVariable();
@@ -461,7 +504,9 @@
             } else {
                 addClassNames(currentFrame.getClassName(), superTypeNames);
             }
-            if (!superTypeNames.contains(className[0])) return false;
+            if (!superTypeNames.contains(className[0])) {
+                return false;
+            }
         }
         return true;
     }
@@ -487,7 +532,9 @@
                 @Override
                 public void run(ResultIterator resultIterator) throws 
Exception {
                     Result res = resultIterator.getParserResult(offset);
-                    if (res == null) return;
+                    if (res == null) {
+                        return;
+                    }
                     CompilationController controller = 
CompilationController.get(res);
                     if (controller == null || 
controller.toPhase(Phase.RESOLVED).compareTo(Phase.RESOLVED) < 0) {
                         return;
diff --git 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ToolTipNodeModelFilter.java
 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ToolTipNodeModelFilter.java
--- 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ToolTipNodeModelFilter.java
+++ 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ToolTipNodeModelFilter.java
@@ -49,7 +49,6 @@
 import org.netbeans.spi.viewmodel.ExtendedNodeModelFilter;
 import org.netbeans.spi.viewmodel.ModelListener;
 import org.netbeans.spi.viewmodel.NodeModel;
-import org.netbeans.spi.viewmodel.NodeModelFilter;
 import org.netbeans.spi.viewmodel.UnknownTypeException;
 import org.openide.util.datatransfer.PasteType;
 
diff --git 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ToolTipView.java
 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ToolTipView.java
--- 
a/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ToolTipView.java
+++ 
b/debugger.jpda.projects/src/org/netbeans/modules/debugger/jpda/projects/ToolTipView.java
@@ -60,7 +60,6 @@
 import javax.swing.JComponent;
 import javax.swing.JPanel;
 import javax.swing.JTextArea;
-import javax.swing.JToolBar;
 import javax.swing.SwingUtilities;
 import javax.swing.UIManager;
 import javax.swing.text.BadLocationException;
@@ -71,8 +70,6 @@
 import org.netbeans.editor.ext.ToolTipSupport;
 import org.netbeans.spi.debugger.ui.ViewFactory;
 
-import org.openide.util.ImageUtilities;
-
 
 // <RAVE>
 // Implement HelpCtx.Provider interface to provide help ids for help system
@@ -143,7 +140,9 @@
     @Override
     public boolean requestFocusInWindow () {
         super.requestFocusInWindow ();
-        if (contentComponent == null) return false;
+        if (contentComponent == null) {
+            return false;
+        }
         return contentComponent.requestFocusInWindow ();
     }
 

[hg] main-silver: Warnings elimination: @Override, brackets, gen...

mentlicher 02/13/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