private static @Nullable Object getSlowData(@NotNull String dataId, @NotNull List<? extends SearchEverywhereFoundElementInfo> selection) {
    if (PlatformCoreDataKeys.PSI_ELEMENT_ARRAY.is(dataId)) {
      List<PsiElement> list =
        ContainerUtil.mapNotNull(selection, o -> (PsiElement)getDataFromElementInfo(CommonDataKeys.PSI_ELEMENT.getName(), o));
      return list.isEmpty() ? null : list.toArray(PsiElement.EMPTY_ARRAY);
    }
    else if (CommonDataKeys.VIRTUAL_FILE_ARRAY.is(dataId)) {
      List<VirtualFile> list =
        ContainerUtil.mapNotNull(selection, o -> (VirtualFile)getDataFromElementInfo(CommonDataKeys.VIRTUAL_FILE.getName(), o));
      return list.isEmpty() ? null : list.toArray(VirtualFile.EMPTY_ARRAY);
    }
    else if (CommonDataKeys.NAVIGATABLE_ARRAY.is(dataId)) {
      List<Navigatable> list = ContainerUtil.mapNotNull(selection, o -> {
        Navigatable navigatable = (Navigatable)getDataFromElementInfo(CommonDataKeys.NAVIGATABLE.getName(), o);
        if (navigatable != null) return navigatable;
        // make F4 work on multi-selection
        Object psi = getDataFromElementInfo(CommonDataKeys.PSI_ELEMENT.getName(), o);
        return psi instanceof Navigatable ? (Navigatable)psi : null;
      });
      return list.isEmpty() ? null : list.toArray(Navigatable.EMPTY_NAVIGATABLE_ARRAY);
    }
    SearchEverywhereFoundElementInfo single = ContainerUtil.getOnlyItem(selection);
    return single == null ? null : getDataFromElementInfo(dataId, single);
  }
private static @Nullable Object getSlowData(@NotNull String dataId, @NotNull List<? extends SearchEverywhereFoundElementInfo> selection)