[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:06 -0700

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

diffstat:

 
maven.apisupport/src/org/netbeans/modules/maven/apisupport/MavenExecProject.java
 |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (25 lines):

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
@@ -48,6 +48,8 @@
 import org.netbeans.modules.maven.api.execute.RunUtils;
 import static org.netbeans.modules.maven.apisupport.Bundle.*;
 import org.netbeans.spi.project.ProjectServiceProvider;
+import org.openide.DialogDisplayer;
+import org.openide.NotifyDescriptor;
 import org.openide.filesystems.FileUtil;
 import org.openide.util.NbBundle.Messages;
 import org.openide.util.Task;
@@ -66,7 +68,11 @@
         Project app = MavenNbModuleImpl.findAppProject(p);
         if (app == null) {
             NbMavenProject prj = p.getLookup().lookup(NbMavenProject.class);
-            throw new IOException("No open nbm-application project found to 
contain " + prj.getMavenProject().getId() + ". Please open the aplication 
project and try again.");
+            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.");
         }
         // 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 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close