private static @NotNull JavaClassReferenceProvider getReferenceProvider() {
    return new JavaClassReferenceProvider() {
      @Override
      public @NotNull GlobalSearchScope getScope(@NotNull Project project) {
        return allScope(project); // relax search to all known classes because we do not know the usage context here
      }
    };
  }
private static @NotNull JavaClassReferenceProvider getReferenceProvider()