Example usage for org.eclipse.jgit.treewalk WorkingTreeIterator getEntryPathString

List of usage examples for org.eclipse.jgit.treewalk WorkingTreeIterator getEntryPathString

Introduction

In this page you can find the example usage for org.eclipse.jgit.treewalk WorkingTreeIterator getEntryPathString.

Prototype

public String getEntryPathString() 

Source Link

Document

Get path of the current entry, as a string.

Usage

From source file:org.eclipse.egit.core.test.LinkedResourcesTest.java

License:Open Source License

@Test
public void testLinkedResourcesIgnoredByContainerTreeIterator() throws Exception {
    // Create linked folder in project1 that points to project2
    IFolder folder = project1.getFolder("link2project2");
    folder.createLink(project2.getLocation(), IResource.ALLOW_MISSING_LOCAL, null);
    // Create linked file in project1 that points to a file in project2
    IFile file = project1.getFile("link2project2folder1file1.txt");
    file.createLink(project2.getFile("project2folder1/project2folder1file1.txt").getLocation(),
            IResource.ALLOW_MISSING_LOCAL, null);
    // Test iterator
    WorkingTreeIterator iterator = IteratorService.createInitialIterator(repository1.repository);
    assertTrue(iterator instanceof ContainerTreeIterator);
    while (!iterator.eof()) {
        assertFalse(iterator.getEntryPathString().startsWith("link2"));
        iterator.next(1);//from w ww .  j av a  2  s  .  c  o  m
    }
}