private static @Nullable String getLocationString(@NotNull Project project, @NotNull VirtualFile file) {
    return Optional.ofNullable(ProjectUtil.guessProjectDir(project))
      .map(projectDir -> VfsUtilCore.getRelativePath(file, projectDir, File.separatorChar))
      .map(path -> "(" + path + ")")
      .orElse(null);
  }
private static @Nullable String getLocationString(@NotNull Project project, @NotNull VirtualFile file)