[hg] main-silver: #226912: Now displaying error message that use...

  • From: Martin Kozeny < >
  • To: ,
  • Subject: [hg] main-silver: #226912: Now displaying error message that use...
  • Date: Thu, 16 May 2013 06:52:12 -0700

changeset 226a81a7aa93 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/226a81a7aa93
description:
        #226912: Now displaying error message that user should open the 
application and try it again.

diffstat:

 
apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/winsys/BasicSettingsPanel.java
 |  9 +++++++--
 
maven.apisupport/src/org/netbeans/modules/maven/apisupport/MavenExecProject.java
                        |  6 +-----
 2 files changed, 8 insertions(+), 7 deletions(-)

diffs (43 lines):

diff --git 
a/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/winsys/BasicSettingsPanel.java
 
b/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/winsys/BasicSettingsPanel.java
--- 
a/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/winsys/BasicSettingsPanel.java
+++ 
b/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/winsys/BasicSettingsPanel.java
@@ -53,8 +53,9 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import javax.swing.DefaultComboBoxModel;
-import org.netbeans.modules.apisupport.project.api.Util;
 import 
org.netbeans.modules.apisupport.project.ui.wizard.common.BasicWizardIterator;
+import org.openide.DialogDisplayer;
+import org.openide.NotifyDescriptor;
 import org.openide.WizardDescriptor;
 import org.openide.filesystems.FileObject;
 import org.openide.util.AsyncGUIJob;
@@ -393,7 +394,11 @@
         }
         task.addTaskListener(new PostProcess());
     } catch (IOException e) {
-        Util.err.notify(e);
+        NotifyDescriptor.Message msg = new 
NotifyDescriptor.Message(e.getMessage(),
+                    NotifyDescriptor.WARNING_MESSAGE);
+                            DialogDisplayer.getDefault().notify(msg);
+        Logger.getLogger(BasicSettingsPanel.class.getName()).log(Level.INFO, 
"No application found", e);
+        //Util.err.notify(e);
     }
 }//GEN-LAST:event_redefineActionPerformed
     
diff --git 
a/maven.apisupport/src/org/netbeans/modules/maven/apisupport/MavenExecProject.java
 
b/maven.apisupport/src/org/netbeans/modules/maven/apisupport/MavenExecProject.java
--- 
a/maven.apisupport/src/org/netbeans/modules/maven/apisupport/MavenExecProject.java
+++ 
b/maven.apisupport/src/org/netbeans/modules/maven/apisupport/MavenExecProject.java
@@ -68,11 +68,7 @@
         Project app = MavenNbModuleImpl.findAppProject(p);
         if (app == null) {
             NbMavenProject prj = p.getLookup().lookup(NbMavenProject.class);
-            NotifyDescriptor.Message msg = new NotifyDescriptor.Message("No 
open nbm-application project found to contain " + 
prj.getMavenProject().getId() + ". Please open the aplication project and try 
again.",
-                    NotifyDescriptor.WARNING_MESSAGE);
-                            DialogDisplayer.getDefault().notify(msg);
-            return null;
-            //throw new IOException("No open nbm-application project found 
to contain " + prj.getMavenProject().getId() + ". Please open the aplication 
project and try again.");
+            throw new IOException("No open nbm-application project found to 
contain " + prj.getMavenProject().getId() + ". Please open the aplication 
project and try again.");
         }
         // XXX build w/ deps first? to do so, RP.post a Runnable which does 
both actions and calls result()
         RunConfig cfg = 
RunUtils.createRunConfig(FileUtil.toFile(app.getProjectDirectory()), app,

[hg] main-silver: #226912: Now displaying error message that use...

Martin Kozeny 05/16/2013

<Possible follow-up(s)>

[hg] main-silver: #226912: Now displaying error message that use...

Martin Kozeny 05/16/2013

Project Features

About this Project

APIsupport was started in November 2009, is owned by Antonin Nebuzelsky, and has 43 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