You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by jt...@apache.org on 2020/06/21 15:30:54 UTC

[netbeans] branch master updated: Display error message when JavaFX cluster cannot be enabled

This is an automated email from the ASF dual-hosted git repository.

jtulach pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new cf2174f  Display error message when JavaFX cluster cannot be enabled
cf2174f is described below

commit cf2174f70dcbb5c6e432c53298e231a0b25d3b32
Author: Eppleton IT <se...@dukescript.com>
AuthorDate: Sun Jun 21 17:29:27 2020 +0200

    Display error message when JavaFX cluster cannot be enabled
---
 .../modules/ide/ergonomics/fod/ConfigurationPanel.java  | 17 ++++++++++-------
 .../src/org/netbeans/IllegalModuleException.java        |  3 ---
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/ConfigurationPanel.java b/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/ConfigurationPanel.java
index 4f926b4..74cb2a9 100644
--- a/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/ConfigurationPanel.java
+++ b/ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/ConfigurationPanel.java
@@ -33,6 +33,7 @@ import java.util.Map;
 import static java.util.Objects.nonNull;
 import java.util.Set;
 import java.util.concurrent.Callable;
+import java.util.logging.Level;
 import javax.swing.Box;
 import javax.swing.BoxLayout;
 import javax.swing.GroupLayout;
@@ -363,18 +364,21 @@ public class ConfigurationPanel extends JPanel {
                         try {
                             ConfigurationPanel.this.add(callable.call(), BorderLayout.CENTER);
                         } catch (Exception ex) {
-                            // TODO: add warning panel
+                            Exceptions.attachSeverity(ex, Level.INFO);
                             Exceptions.printStackTrace(ex);
                         }
                         ConfigurationPanel.this.invalidate();
                         ConfigurationPanel.this.revalidate();
                         ConfigurationPanel.this.repaint();
-                        if (featureInfo != null && featureInfo.isPresent()) {
-                            msg = NbBundle.getMessage(ConfigurationPanel.class, "MSG_EnableFailed");
-                        } else {
-                            msg = NbBundle.getMessage(ConfigurationPanel.class, "MSG_DownloadFailed");
+                        if (featureInfo != null && !featureInfo.isEnabled()) {
+                            if (featureInfo.isPresent()) {
+                                msg = NbBundle.getMessage(ConfigurationPanel.class, "MSG_EnableFailed");
+                            } else {
+                                msg = NbBundle.getMessage(ConfigurationPanel.class, "MSG_DownloadFailed");
+                            }
+                            progressMonitor.onError(msg);
+                            return;
                         }
-                        setError(msg);
                         activateButton.setEnabled(true);
                         progressPanel.removeAll();
                         progressPanel.revalidate();
@@ -435,7 +439,6 @@ public class ConfigurationPanel extends JPanel {
             SwingUtilities.invokeLater(new Runnable() {
 
                 public void run() {
-                    // TODO: mark as html
                     setError("<html>" + message + "</html>"); // NOI18N
                     progressPanel.removeAll();
                     progressPanel.add(errorLabel);
diff --git a/platform/o.n.bootstrap/src/org/netbeans/IllegalModuleException.java b/platform/o.n.bootstrap/src/org/netbeans/IllegalModuleException.java
index aec8101..5d44329 100644
--- a/platform/o.n.bootstrap/src/org/netbeans/IllegalModuleException.java
+++ b/platform/o.n.bootstrap/src/org/netbeans/IllegalModuleException.java
@@ -83,9 +83,6 @@ final class IllegalModuleException extends IllegalArgumentException {
     IllegalModuleException(Reason reason, Set<Module> bogus) {
         this.reason = reason;
         this.bogus = bogus;
-        if (reason == Reason.ENABLE_MISSING) {
-            throw new AssertionError(this);
-        }
     }
 
     @Override


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists