Search in sources :

Example 1 with IndexDiffChangedListener

use of org.eclipse.egit.core.internal.indexdiff.IndexDiffChangedListener in project egit by eclipse.

the class IndexDiffCacheTest method setUp.

@Override
@Before
public void setUp() throws Exception {
    super.setUp();
    testRepository = new TestRepository(gitDir);
    repository = testRepository.getRepository();
    listenerCalled = new AtomicBoolean(false);
    indexDiffDataResult = new AtomicReference<>(null);
    indexDiffListener = new IndexDiffChangedListener() {

        @Override
        public void indexDiffChanged(Repository repo, IndexDiffData indexDiffData) {
            listenerCalled.set(true);
            indexDiffDataResult.set(indexDiffData);
        }
    };
}
Also used : AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) TestRepository(org.eclipse.egit.core.test.TestRepository) TestRepository(org.eclipse.egit.core.test.TestRepository) Repository(org.eclipse.jgit.lib.Repository) IndexDiffChangedListener(org.eclipse.egit.core.internal.indexdiff.IndexDiffChangedListener) IndexDiffData(org.eclipse.egit.core.internal.indexdiff.IndexDiffData) Before(org.junit.Before)

Aggregations

AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1 IndexDiffChangedListener (org.eclipse.egit.core.internal.indexdiff.IndexDiffChangedListener)1 IndexDiffData (org.eclipse.egit.core.internal.indexdiff.IndexDiffData)1 TestRepository (org.eclipse.egit.core.test.TestRepository)1 Repository (org.eclipse.jgit.lib.Repository)1 Before (org.junit.Before)1