Package com.intellij.openapi.vcs.diff

Examples of com.intellij.openapi.vcs.diff.DiffProvider


    @NotNull
    public VirtualFile fetchRevision(@NotNull Project project, @NotNull VirtualFile vFile, @NotNull String rev)
      throws RevuFriendlyException
    {
      DiffProvider diffProvider = RevuVcsUtils.getDiffProvider(project, vFile);
      if (diffProvider == null)
      {
        throw new RevuFriendlyException("Failed to get DiffProvider: " + vFile,
          RevuBundle.message("friendlyError.failedToFetchVcsFile.noVcs.details.text",
          vFile.getPath()));
      }

      AbstractVcs vcs = VcsUtil.getVcsFor(project, vFile);
      assert vcs != null;

      VcsRevisionNumber vcsRevisionNumber;
      try
      {
        vcsRevisionNumber = vcs.parseRevisionNumber(rev);
      }
      catch (VcsException e)
      {
        throw new RevuFriendlyException("Failed to parse VCS revision number: " + rev,
          RevuBundle.message("friendlyError.failedToFetchVcsFile.invalidRevision.details.text",
          vFile.getPath(), rev));
      }

      ContentRevision contentRevision = diffProvider.createFileContent(vcsRevisionNumber, vFile);
      String content = null;
      if (contentRevision != null)
      {
        try
        {
View Full Code Here


  }

  @Nullable
  public static VcsRevisionNumber getVcsRevisionNumber(@NotNull Project project, @NotNull VirtualFile vFile)
  {
    DiffProvider diffProvider = getDiffProvider(project, vFile);
    if (diffProvider == null)
    {
      return null;
    }

    VcsRevisionNumber rev = diffProvider.getCurrentRevision(vFile);

    return (VcsRevisionNumber.NULL.equals(rev)) ? null : rev;
  }
View Full Code Here

  }

  @Nullable
  public static VcsRevisionNumber getVcsRevisionNumber(@NotNull Project project, @NotNull VirtualFile vFile)
  {
    DiffProvider diffProvider = getDiffProvider(project, vFile);
    if (diffProvider == null)
    {
      return null;
    }

    VcsRevisionNumber rev = diffProvider.getCurrentRevision(vFile);

    return (VcsRevisionNumber.NULL.equals(rev)) ? null : rev;
  }
View Full Code Here

    @NotNull
    public VirtualFile fetchRevision(@NotNull Project project, @NotNull VirtualFile vFile, @NotNull String rev)
      throws RevuFriendlyException
    {
      DiffProvider diffProvider = RevuVcsUtils.getDiffProvider(project, vFile);
      if (diffProvider == null)
      {
        throw new RevuFriendlyException("Failed to get DiffProvider: " + vFile,
          RevuBundle.message("friendlyError.failedToFetchVcsFile.noVcs.details.text",
          vFile.getPath()));
      }

      AbstractVcs vcs = VcsUtil.getVcsFor(project, vFile);
      assert vcs != null;

      VcsRevisionNumber vcsRevisionNumber = vcs.parseRevisionNumber(rev);
      if (vcsRevisionNumber == null)
      {
        throw new RevuFriendlyException("Failed to parse VCS revision number: " + rev,
          RevuBundle.message("friendlyError.failedToFetchVcsFile.invalidRevision.details.text",
          vFile.getPath(), rev));
      }

      ContentRevision contentRevision = diffProvider.createFileContent(vcsRevisionNumber, vFile);
      String content = null;
      if (contentRevision != null)
      {
        try
        {
View Full Code Here

TOP

Related Classes of com.intellij.openapi.vcs.diff.DiffProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.