Examples of AdaptableFileTreeIterator


Examples of org.eclipse.egit.core.AdaptableFileTreeIterator

    int baseTreeIndex;
    if (baseCommit == null) {
      // compare workspace with something
      checkIgnored = true;
      baseTreeIndex = tw.addTree(new AdaptableFileTreeIterator(
          repository, ResourcesPlugin.getWorkspace().getRoot()));
    } else
      baseTreeIndex = tw.addTree(new CanonicalTreeParser(null, repository
          .newObjectReader(), baseCommit.getTree()));
    int compareTreeIndex;
View Full Code Here

Examples of org.eclipse.egit.core.AdaptableFileTreeIterator

    TreeWalk tw = new TreeWalk(repository);
    try {
      int baseTreeIndex;
      if (baseCommit == null) {
        checkIgnored = true;
        baseTreeIndex = tw.addTree(new AdaptableFileTreeIterator(
            repository, ResourcesPlugin.getWorkspace().getRoot()));
      } else
        baseTreeIndex = tw.addTree(new CanonicalTreeParser(null,
            repository.newObjectReader(), baseCommit.getTree()));
      int compareTreeIndex;
View Full Code Here

Examples of org.eclipse.egit.core.AdaptableFileTreeIterator

   * @param path
   * @return file status
   * @throws IOException
   */
  private Status getFileStatus(String path) throws IOException {
    AdaptableFileTreeIterator fileTreeIterator = new AdaptableFileTreeIterator(
        repository, ResourcesPlugin.getWorkspace().getRoot());
    IndexDiff indexDiff = new IndexDiff(repository, Constants.HEAD, fileTreeIterator);
    Set<String> repositoryPaths = Collections.singleton(path);
    indexDiff.setFilter(PathFilterGroup.createFromStrings(repositoryPaths));
    indexDiff.diff(null, 0, 0, ""); //$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.egit.core.AdaptableFileTreeIterator

    RepositoryMapping map = RepositoryMapping.getMapping(project);
    AddCommand command = addCommands.get(map);
    if (command == null) {
      Repository repo = map.getRepository();
      Git git = new Git(repo);
      AdaptableFileTreeIterator it = new AdaptableFileTreeIterator(repo,
          resource.getWorkspace().getRoot());
      command = git.add().setWorkingTreeIterator(it);
      addCommands.put(map, command);
    }
    String filepattern = map.getRepoRelativePath(resource);
View Full Code Here

Examples of org.eclipse.egit.core.AdaptableFileTreeIterator

    parentRepository.connect(parentProject);
    RepositoryTestCase.fsTick(null);
    parentRepository.trackAllFiles(parentProject);
    parentRepository.commit("Initial commit");

    treeIt = new AdaptableFileTreeIterator(
        parentRepository.getRepository(), parentFile.getWorkspace()
            .getRoot());
  }
View Full Code Here

Examples of org.eclipse.egit.core.AdaptableFileTreeIterator

  public void testFileTreeToContainerAdaptation() throws IOException {
    final IWorkspaceRoot root = project.getProject().getWorkspace()
        .getRoot();

    final TreeWalk treeWalk = new TreeWalk(repository);
    treeWalk.addTree(new AdaptableFileTreeIterator(repository, root));
    treeWalk.setRecursive(true);

    final IFile eclipseFile = project.getProject().getFile(file.getName());
    final RepositoryMapping mapping = RepositoryMapping
        .getMapping(eclipseFile);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.