public static @NotNull Collection<VirtualFile> getAllFilesByExt(@NotNull Project project,
                                                                  @NotNull String ext,
                                                                  @NotNull GlobalSearchScope searchScope) {
    if (ext.isEmpty()) {
      return Java11Shim.INSTANCE.listOf();
    }

    String dotExt = "." + ext;
    int len = ext.length() + 1;

    Set<String> names = new HashSet<>();
    for (String name : getAllFilenames(project)) {
      int length = name.length();
      if (length > len && name.substring(length - len).equalsIgnoreCase(dotExt)) {
        names.add(name);
      }
    }
    return getVirtualFilesByNames(names, searchScope, null);
  }
public static @NotNull Collection<VirtualFile> getAllFilesByExt(@NotNull Project project,
                                                                  @NotNull String ext,
                                                                  @NotNull GlobalSearchScope searchScope)