Package org.eclipse.egit.core.internal.indexdiff

Examples of org.eclipse.egit.core.internal.indexdiff.IndexDiffCache


    IndexDiffData data3 = waitForListenerCalled();
    assertThat(data3.getIgnoredNotInIndex(), not(hasItem("Project-1/sub/ignore")));
  }

  private void prepareCacheEntry() {
    IndexDiffCache indexDiffCache = Activator.getDefault()
        .getIndexDiffCache();
    // This call should trigger an indexDiffChanged event
    IndexDiffCacheEntry cacheEntry = indexDiffCache
        .getIndexDiffCacheEntry(repository);
    listenerCalled = new AtomicBoolean(false);
    indexDiffDataResult = new AtomicReference<IndexDiffData>(
        null);
    cacheEntry.addIndexDiffChangedListener(new IndexDiffChangedListener() {
View Full Code Here


    Repository repo = repos.iterator().next();
    Collection<String> selectedRepoPaths = pathsByRepository.get(repo);
    if (selectedRepoPaths.isEmpty())
      return false;

    IndexDiffCache cache = org.eclipse.egit.core.Activator.getDefault().getIndexDiffCache();
    if (cache == null)
      return false;

    IndexDiffCacheEntry entry = cache.getIndexDiffCacheEntry(repo);
    if (entry == null || entry.getIndexDiff() == null)
      return false;

    Set<String> conflictingFiles = entry.getIndexDiff().getConflicting();
    if (conflictingFiles.isEmpty())
View Full Code Here

    RepositoryState state = repo.getRepositoryState();
    return state.isRebasing();
  }

  private boolean canContinue(Repository repo) {
    IndexDiffCache diffCache = org.eclipse.egit.core.Activator.getDefault()
        .getIndexDiffCache();
    if (diffCache != null) {
      IndexDiffCacheEntry entry = diffCache.getIndexDiffCacheEntry(repo);
      return entry != null
          && entry.getIndexDiff().getConflicting().isEmpty();
    }
    return false;
  }
View Full Code Here

        .splitResourcesByRepository(relevantResources);
    for (Map.Entry<Repository, Collection<String>> entry : pathsByRepo
        .entrySet()) {
      Repository repository = entry.getKey();
      Collection<String> paths = entry.getValue();
      IndexDiffCache cache = Activator.getDefault().getIndexDiffCache();
      if (cache == null)
        continue;

      IndexDiffCacheEntry cacheEntry = cache.getIndexDiffCacheEntry(repository);
      if (cacheEntry == null)
        continue;

      IndexDiffData indexDiff = cacheEntry.getIndexDiff();
      if (indexDiff == null)
View Full Code Here

  private void refresh() {
    Map<Repository, Collection<String>> pathsByRepository =
        ResourceUtil.splitPathsByRepository(paths);
    for (Repository repository : pathsByRepository.keySet()) {
      IndexDiffCache cache = org.eclipse.egit.core.Activator.getDefault().getIndexDiffCache();
      IndexDiffCacheEntry entry = cache.getIndexDiffCacheEntry(repository);
      if (entry != null)
        entry.refresh();
    }
    GitLightweightDecorator.refresh();
  }
View Full Code Here

          return;

        handleResourceChange(delta);
      }
    };
    IndexDiffCache indexDiffCache = Activator.getDefault().getIndexDiffCache();
    if (indexDiffCache != null)
      indexDiffCache.addIndexDiffChangedListener(indexChangeListener);

    ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener);

    initialize();
  }
View Full Code Here

  public void dispose() {
    Activator activator = Activator.getDefault();
    if (activator == null)
      return;

    IndexDiffCache indexDiffCache = activator.getIndexDiffCache();
    if (indexDiffCache != null)
      indexDiffCache.removeIndexDiffChangedListener(indexChangeListener);

    ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener);
    subscriber.dispose();
    super.dispose();
  }
View Full Code Here

    }
    GitCreatePatchWizard.run(getShell(), null, repository, resources);
  }

  private boolean isWorkingTreeClean() {
    IndexDiffCache diffCache = org.eclipse.egit.core.Activator.getDefault()
        .getIndexDiffCache();
    if (diffCache != null) {
      IndexDiffData diffData = diffCache.getIndexDiffCacheEntry(
          repository).getIndexDiff();
      if (diffData != null) {
        Set<String> modified = diffData.getModified();
        Set<String> untracked = diffData.getUntracked();
        Set<String> missing = diffData.getMissing();
View Full Code Here

    createStableBranch(myRepository);
    // and check in some stuff into master again
    touchAndSubmit(null);

    // Make sure cache entry is already listening for changes
    IndexDiffCache cache = Activator.getDefault().getIndexDiffCache();
    cache.getIndexDiffCacheEntry(lookupRepository(gitDir));

    return gitDir;
  }
View Full Code Here

    MergeResult mergeResult = mergeOp.getResult();
    assertThat(mergeResult.getMergeStatus(), is(MergeStatus.CONFLICTING));
    assertThat(mergeResult.getConflicts().keySet(),
        hasItem(path.toString()));

    IndexDiffCache cache = Activator.getDefault().getIndexDiffCache();
    cache.getIndexDiffCacheEntry(testRepository.getRepository());
    TestUtil.joinJobs(JobFamilies.INDEX_DIFF_CACHE_UPDATE);

    SWTBotTree packageExplorer = TestUtil.getExplorerTree();
    SWTBotTreeItem project1 = getProjectItem(packageExplorer, PROJ1)
        .select();
View Full Code Here

TOP

Related Classes of org.eclipse.egit.core.internal.indexdiff.IndexDiffCache

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.