You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by he...@apache.org on 2020/04/09 21:24:20 UTC

[netbeans] branch NETBEANS-4029 created (now abe985c)

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

hectorespert pushed a change to branch NETBEANS-4029
in repository https://gitbox.apache.org/repos/asf/netbeans.git.


      at abe985c  [NETBEANS-4029] Fix feature dialog

This branch includes the following new commits:

     new abe985c  [NETBEANS-4029] Fix feature dialog

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
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


[netbeans] 01/01: [NETBEANS-4029] Fix feature dialog

Posted by he...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hectorespert pushed a commit to branch NETBEANS-4029
in repository https://gitbox.apache.org/repos/asf/netbeans.git

commit abe985cafc7df5d26f72a18cc84364bc386c5963
Author: Hector Espert <he...@gmail.com>
AuthorDate: Thu Apr 9 23:21:11 2020 +0200

    [NETBEANS-4029] Fix feature dialog
---
 .../ide/ergonomics/fod/ConfigurationPanel.java     | 32 +++++++++++++++-------
 1 file changed, 22 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 be78b57..6f98a8a 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
@@ -24,9 +24,11 @@ import java.awt.EventQueue;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.Callable;
@@ -142,29 +144,39 @@ public class ConfigurationPanel extends JPanel implements Runnable {
             downloadLabel.setVisible(true);
             activateButton.setVisible(true);
             downloadButton.setVisible(true);
-            StringBuilder sbDownload = new StringBuilder();
-
+            
+            List<String> downloadStringList = new ArrayList<>();
+            
             // collect descriptions from features contributing installed extras
             for (FeatureInfo fi : extrasMap.values()) {
                 String s = required
                         ? fi.getExtraModulesRequiredText()
                         : fi.getExtraModulesRecommendedText();
-                if (s != null) {
-                    if (sbDownload.length() > 0) {
-                        sbDownload.append("\n");
-                    }
-                    sbDownload.append(s);
+                if (!downloadStringList.contains(s)) {
+                    downloadStringList.add(s);
                 }
             }
+            
             if (required) {
                 activateButton.setEnabled(false);
             } else {
                 activateButton.setEnabled(true);
             }
 
-            String lblDownloadMsg = sbDownload.toString();
+            String lblDownloadMsg = "";
+            if (!downloadStringList.isEmpty()) {
+                StringBuilder sbDownload = new StringBuilder("<html><body>");
+                for (int i = 0; i < downloadStringList.size(); i++) {
+                    sbDownload.append(downloadStringList.get(i));
+                    if (i > 0 || i < downloadStringList.size() - 1) {
+                        sbDownload.append("<br>");
+                    }
+                }
+                
+                sbDownload.append("</body></html>");
+                lblDownloadMsg = sbDownload.toString();
+            }
 
-            String list = "";
             if (!missingModules.isEmpty()) {
                 StringBuilder sb = new StringBuilder();
                 for (FeatureInfo.ExtraModuleInfo s : missingModules) {
@@ -173,7 +185,7 @@ public class ConfigurationPanel extends JPanel implements Runnable {
                     }
                     sb.append(s.displayName());
                 }
-                list = sb.toString();
+                String list = sb.toString();
                 if (required) {
                     lblDownloadMsg = NbBundle.getMessage(ConfigurationPanel.class, "MSG_MissingRequiredModules", displayName, list);
                     activateButton.setEnabled(false);


---------------------------------------------------------------------
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