hectorespert commented on a change in pull request #2070:
URL: https://github.com/apache/netbeans/pull/2070#discussion_r418291535



##########
File path: 
ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/ConfigurationPanel.java
##########
@@ -190,6 +180,40 @@ public void setInfo(FeatureInfo info, String displayName, 
Collection<UpdateEleme
             org.openide.awt.Mnemonics.setLocalizedText(downloadButton, 
btnDownloadMsg);
         }
     }
+    
+    /**
+     * Collect extra modules texts
+     */
+    protected List<String> 
collectExtraModulesTextsFromFeatures(Collection<FeatureInfo> features, boolean 
required) {
+        List<String> descriptionsList = new ArrayList<>();
+        for (FeatureInfo fi : features) {
+            String s = required ? fi.getExtraModulesRequiredText(): 
fi.getExtraModulesRecommendedText();
+            if (!descriptionsList.contains(s)) {
+                descriptionsList.add(s);
+            }
+        }
+        return descriptionsList;
+    } 
+    
+    /**
+     * Generate download message from extra modules texts
+     * @param extraModulesTexts
+     * @return String Text to set in download label
+     */
+    protected String generateDownloadMessageFromExtraModulesTexts(List<String> 
extraModulesTexts) {
+        StringBuilder sbDownload = new StringBuilder();

Review comment:
       I could merge both functions, but I created these to allow create tests 
for this part of the code. 
   Is not the best solution but is too hard to test the ConfigurationPanel 
class due his dependencies.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to