ModCommand (@NotNull ActionContext context, @NotNull PsiField field, @NotNull List<PsiMethod> constructors) { if (!field.isValid() || ContainerUtil.exists(constructors, c -> !c.isValid())) return ModCommand.nop(); PsiClass psiClass = field.getContainingClass(); if (psiClass == null) return ModCommand.nop(); List<PsiField> allFields = getFieldsToFix(psiClass, field, constructors); if (allFields.isEmpty()) return ModCommand.nop(); if (allFields.size() == 1) return performForConstructorsAndFields(context, allFields, constructors); List<PsiFieldMember> members = ContainerUtil.map(allFields, PsiFieldMember::new); return new ModChooseMember(QuickFixBundle.message("choose.fields.to.generate.constructor.parameters.for"), members, members, ModChooseMember.SelectionMode.MULTIPLE, selected -> performForConstructorsAndFields( context, ContainerUtil.map(selected, member -> ((PsiFieldMember)member).getElement()), constructors)); }