@Override
  public @Nullable VirtualFile resolveSymlink(@NotNull VirtualFile file) {
    if (myMode == Mode.DISABLED) return file;

    VirtualFile canonicalFile = file.getCanonicalFile();
    if (canonicalFile == null || file.equals(canonicalFile)) {
      return null;
    }

    if (myMode == Mode.FORCE_TARGET) {
      return canonicalFile;
    }

    if (myMode == Mode.PREFER_TARGET) {
      if (ProjectLevelVcsManager.getInstance(myProject).getVcsFor(canonicalFile) != null) {
        return canonicalFile;
      }
    }
    else if (myMode == Mode.FALLBACK_TARGET) {
      if (ProjectLevelVcsManager.getInstance(myProject).getVcsFor(file) == null &&
          ProjectLevelVcsManager.getInstance(myProject).getVcsFor(canonicalFile) != null) {
        return canonicalFile;
      }
    }
    return null;
  }
@Override
  public @Nullable VirtualFile resolveSymlink(@NotNull VirtualFile file)