Package com.intellij.openapi.vcs

Examples of com.intellij.openapi.vcs.ProjectLevelVcsManager


   * @return the complete set of files this action should apply to
   */
  @NotNull
  protected VirtualFile[] collectAffectedFiles(@NotNull Project project, @NotNull VirtualFile[] files) {
    List<VirtualFile> affectedFiles = new ArrayList<VirtualFile>(files.length);
    ProjectLevelVcsManager projectLevelVcsManager = ProjectLevelVcsManager.getInstance(project);
    for (VirtualFile file : files) {
      if (!file.isDirectory() && projectLevelVcsManager.getVcsFor(file) instanceof MksVcs) {
        affectedFiles.add(file);
      } else if (file.isDirectory() && isRecursive()) {
        addChildren(project, affectedFiles, file);
      }

View Full Code Here


        VirtualFile file = e.getData(PlatformDataKeys.VIRTUAL_FILE);
        if (file == null) {
            Messages.showErrorDialog(project, "Cannot access file", ERROR_DIALOG_TITLE);
            return;
        }
        ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(project);
        if (vcsManager == null) {
            Messages.showErrorDialog(project, "VCS is not enabled for project " + project.getName(), ERROR_DIALOG_TITLE);
            return;
        }
        AbstractVcs vcs = vcsManager.getVcsFor(file);
        if (!(vcs instanceof SvnVcs)) {
            Messages.showErrorDialog(project, file.getName() + " is not managed by Subversion", ERROR_DIALOG_TITLE);
            return;
        }
View Full Code Here

      }
    });
  }

  protected void activateVCS(final String vcsName) {
    ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(myProject);
    vcsManager.setDirectoryMapping(myWorkingCopyDir.getPath(), vcsName);
    vcsManager.updateActiveVcss();

    AbstractVcs vcs = vcsManager.findVcsByName(vcsName);
    Assert.assertEquals(1, vcsManager.getRootsUnderVcs(vcs).length);
  }
View Full Code Here

    }
  }

  protected void setStandardConfirmation(final String vcsName, final VcsConfiguration.StandardConfirmation op,
                                         final VcsShowConfirmationOption.Value value) {
    ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(myProject);
    final AbstractVcs vcs = vcsManager.findVcsByName(vcsName);
    VcsShowConfirmationOption option = vcsManager.getStandardConfirmation(op, vcs);
    option.setValue(value);
  }
View Full Code Here

TOP

Related Classes of com.intellij.openapi.vcs.ProjectLevelVcsManager

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.