@SuppressWarnings("TypeParameterExtendsFinalClass")
  private static @Nullable String findPrevFile(@NotNull JList<? extends SearchEverywhereItem> list, int index) {
    if (index <= 0) return null;
    Object prev = list.getModel().getElementAt(index - 1);
    //noinspection ConstantConditions,CastCanBeRemovedNarrowingVariableType
    return prev instanceof SearchEverywhereItem ? ((SearchEverywhereItem)prev).getPresentation().getFileString() : null;
  }
@SuppressWarnings("TypeParameterExtendsFinalClass")
  private static @Nullable String findPrevFile(@NotNull JList<? extends SearchEverywhereItem> list, int index)