static <T> List<T> findFxmls(ID<String, ?> id, Project project,
                               @NotNull String className,
                               Function<VirtualFile, T> f,
                               GlobalSearchScope scope) {
    return ReadAction.compute(() -> {
      final Collection<VirtualFile> files;
      try {
        files = FileBasedIndex.getInstance().getContainingFiles(id, className,
                                                                GlobalSearchScope.projectScope(project).intersectWith(scope));
      }
      catch (IndexNotReadyException e) {
        return Collections.emptyList();
      }
      if (files.isEmpty()) return Collections.emptyList();
      List<T> result = new ArrayList<>();
      for (VirtualFile file : files) {
        if (!file.isValid()) continue;
        final T fFile = f.fun(file);
        if (fFile != null) {
          result.add(fFile);
        }
      }
      return result;
    });
  }
static <T> List<T> findFxmls(ID<String, ?> id, Project project,
                               @NotNull String className,
                               Function<VirtualFile, T> f,
                               GlobalSearchScope scope)