public static @Nullable @NlsSafe String getProjectRelativePath(@NotNull Project project, @Nullable File fileName) {
    if (fileName == null) {
      return null;
    }

    String baseDir = project.getBasePath();
    if (baseDir == null) {
      return fileName.toString();
    }

    String relativePath = FileUtil.getRelativePath(new File(baseDir), fileName);
    return relativePath == null ? fileName.toString() : relativePath;
  }
public static @Nullable @NlsSafe String getProjectRelativePath(@NotNull Project project, @Nullable File fileName)