@NotNull
  static List<AttachToProcessItem> doCollectAttachProcessItems(@NotNull final Project project,
                                                               @NotNull XAttachHost host,
                                                               @NotNull List<? extends ProcessInfo> processInfos,
                                                               @NotNull ProgressIndicator indicator,
                                                               @NotNull List<? extends XAttachDebuggerProvider> providers) {
    UserDataHolderBase dataHolder = new UserDataHolderBase();

    List<AttachToProcessItem> currentItems = new ArrayList<>();

    for (ProcessInfo process : processInfos) {

      MultiMap<XAttachPresentationGroup<ProcessInfo>, XAttachDebugger> groupsWithDebuggers = new MultiMap<>();

      for (XAttachDebuggerProvider provider : providers) {
        indicator.checkCanceled();

        groupsWithDebuggers.putValues(provider.getPresentationGroup(),
                                      provider.getAvailableDebuggers(project, host, process, dataHolder));
      }

      for (XAttachPresentationGroup<ProcessInfo> group : groupsWithDebuggers.keySet()) {
        Collection<XAttachDebugger> debuggers = groupsWithDebuggers.get(group);
        if (!debuggers.isEmpty()) {
          currentItems.add(new AttachToProcessItem(group, false, host, process, new ArrayList<>(debuggers), project, dataHolder));
        }
      }
    }

    Collections.sort(currentItems);

    doUpdateFirstInGroup(currentItems);

    List<AttachToProcessItem> result = getRecentItems(currentItems, host, project, dataHolder);

    result.addAll(currentItems);
    return result;
  }
@NotNull
  static List<AttachToProcessItem> doCollectAttachProcessItems(@NotNull final Project project,
                                                               @NotNull XAttachHost host,
                                                               @NotNull List<? extends ProcessInfo> processInfos,
                                                               @NotNull ProgressIndicator indicator,
                                                               @NotNull List<? extends XAttachDebuggerProvider> providers)