You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/03/24 11:47:22 UTC

[GitHub] [netbeans] sdedic commented on a change in pull request #2755: [NETBEANS-5350] Improved Fix Uses dialog

sdedic commented on a change in pull request #2755:
URL: https://github.com/apache/netbeans/pull/2755#discussion_r599981673



##########
File path: php/php.editor/src/org/netbeans/modules/php/editor/actions/FixDuplicateImportStmts.java
##########
@@ -147,6 +154,60 @@ private static String getBundleString(String s) {
         return NbBundle.getMessage(FixDuplicateImportStmts.class, s);
     }
 
+    @NbBundle.Messages({
+        "ClearSuggestionsButton=Clear Suggestions",
+        "RestoreDefaultsButton=Restore Defaults"
+    })
+    private void initButtons(ImportData importData) {
+        int numberOfItems = importData.getItems().size();
+        defaultVariants = new ItemVariant[numberOfItems];
+        dontUseVariants = new ItemVariant[numberOfItems];
+        for (int i = 0; i < numberOfItems; i++) {
+            DataItem dataItem = importData.getItems().get(i);
+            defaultVariants[i] = dataItem.getDefaultVariant();
+            dontUseVariants[i] = dataItem.getDefaultVariant();
+            for (ItemVariant variant : dataItem.getVariants()) {
+                if (!variant.canBeUsed()) {

Review comment:
       this seem to also work for "Cannot be resolved" items...




-- 
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:
users@infra.apache.org



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

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