static @Nullable VirtualFile getResourceFile(@NotNull Class<?> baseClass, @NonNls @NotNull String resourcePath) {
    URL url = baseClass.getResource(resourcePath);
    if (url == null) {
      LOG.error("Cannot find resource " + resourcePath);
      return null;
    }
    VirtualFile file = VfsUtil.findFileByURL(url);
    if (file != null) {
      return file;
    }
    LOG.info("File not found by " + url + ", performing refresh...");
    ApplicationManager.getApplication().invokeLaterOnWriteThread(() -> {
      VirtualFile refreshed = WriteAction.compute(() -> {
        return VirtualFileManager.getInstance().refreshAndFindFileByUrl(VfsUtilCore.convertFromUrl(url));
      });
      if (refreshed != null) {
        LOG.info("Refreshed " + url + " successfully");
        for (Project project : ProjectManager.getInstance().getOpenProjects()) {
          JsonSchemaService service = project.getService(JsonSchemaService.class);
          service.reset();
        }
      }
      else {
        LOG.error("Cannot refresh and find file by " + resourcePath);
      }
    });
    return null;
  }
static @Nullable VirtualFile getResourceFile(@NotNull Class<?> baseClass, @NonNls @NotNull String resourcePath)