private static void choosePropertiesFileAndExtract(Project project, List<XmlTag> tags, Consumer<String> doFixConsumer) {
    ResourceBundleManager resourceBundleManager;
    try {
      resourceBundleManager = ResourceBundleManager.getManager(ContainerUtil.map(tags, x -> x.getContainingFile()), project);
    }
    catch (ResourceBundleManager.ResourceBundleNotFoundException e) {
      resourceBundleManager = null;
    }
    @NotNull Set<Module> contextModules = ContainerUtil.map2Set(tags, x -> ModuleUtilCore.findModuleForPsiElement(x));
    ResourceBundleManager finalResourceBundleManager = resourceBundleManager;
    List<String> files = ProgressManager.getInstance().runProcessWithProgressSynchronously(
      () -> ReadAction.compute(() -> finalResourceBundleManager != null ? finalResourceBundleManager.suggestPropertiesFiles(contextModules)
                                                                        : I18nUtil.defaultSuggestPropertiesFiles(project, contextModules)),
      DevKitBundle.message("progress.title.calculate.target.properties.file"), true, project);

    if (files == null || files.isEmpty()) return;

    if (files.size() == 1) {
      doFixConsumer.accept(files.get(0));
      return;
    }

    final IPopupChooserBuilder<String> builder = JBPopupFactory.getInstance()
      .createPopupChooserBuilder(files)
      .setNamerForFiltering(x -> x)
      .setTitle(DevKitI18nBundle.message("inspections.plugin.xml.i18n.choose.bundle.4inspections.title")).
      setItemChosenCallback(selected -> {
        doFixConsumer.accept(selected);
      });
    builder.createPopup().showCenteredInCurrentWindow(project);
  }
private static void choosePropertiesFileAndExtract(Project project, List<XmlTag> tags, Consumer<String> doFixConsumer)