[hg] main-silver: #232288: show a nicer warning when the target ...

  • From: Jan Lahoda < >
  • To:
  • Subject: [hg] main-silver: #232288: show a nicer warning when the target ...
  • Date: Wed, 10 Jul 2013 23:36:04 -0700

changeset fe057cc6f82b in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/fe057cc6f82b
description:
        #232288: show a nicer warning when the target file cannot be open.

diffstat:

 code.analysis/src/org/netbeans/modules/analysis/ui/Nodes.java |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (28 lines):

diff --git a/code.analysis/src/org/netbeans/modules/analysis/ui/Nodes.java 
b/code.analysis/src/org/netbeans/modules/analysis/ui/Nodes.java
--- a/code.analysis/src/org/netbeans/modules/analysis/ui/Nodes.java
+++ b/code.analysis/src/org/netbeans/modules/analysis/ui/Nodes.java
@@ -88,6 +88,7 @@
 import org.openide.text.PositionBounds;
 import org.openide.util.Exceptions;
 import org.openide.util.Lookup;
+import org.openide.util.NbBundle.Messages;
 import org.openide.util.lookup.Lookups;
 
 /**
@@ -691,6 +692,7 @@
         
     }
 
+    @Messages("ERR_CannotOpen=Cannot open target file")
     static void openErrorDescription(AnalyzerFactory analyzer, 
ErrorDescription ed) throws IndexOutOfBoundsException {
         try {
             DataObject od = DataObject.find(ed.getFile());
@@ -703,7 +705,7 @@
                 analyzer.warningOpened(ed);
             }
         } catch (IOException ex) {
-            Exceptions.printStackTrace(ex);
+            
Exceptions.printStackTrace(Exceptions.attachLocalizedMessage(Exceptions.attachSeverity(ex,
 Level.WARNING), Bundle.ERR_CannotOpen()));
         }
     }
 

[hg] main-silver: #232288: show a nicer warning when the target ...

Jan Lahoda 07/11/2013

Project Features

About this Project

Editor was started in November 2009, is owned by Martin Ryzl, and has 349 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20160708.bf2ac18). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close