@Override
  public void processQuery(ReferencesSearch.@NotNull SearchParameters queryParameters, @NotNull Processor<? super PsiReference> consumer) {
    if (queryParameters.getElementToSearch() instanceof PsiDirectory directory) {
      var project = queryParameters.getProject();
      var modules = ModuleManager.getInstance(project).getModules();
      for (var module : modules) {
        processModule(project, module, directory, consumer);
      }
    }
  }
@Override
  public void processQuery(ReferencesSearch.@NotNull SearchParameters queryParameters, @NotNull Processor<? super PsiReference> consumer)