public static List<ItemWithPresentation> computePresentationInBackground(
    @NotNull Project project,
    PsiElement @NotNull [] targets,
    boolean hasDifferentNames
  ) {
    SmartPointerManager manager = SmartPointerManager.getInstance(project);
    return ActionUtil.underModalProgress(project, CodeInsightBundle.message("progress.title.preparing.result"),
                                         () -> ContainerUtil.map(targets, element -> new ItemWithPresentation(
                                           manager.createSmartPsiElementPointer(element),
                                           computePresentation(element, hasDifferentNames))));
  }
public static List<ItemWithPresentation> computePresentationInBackground(
    @NotNull Project project,
    PsiElement @NotNull [] targets,
    boolean hasDifferentNames
  )