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

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


    registerIndexDiffChangeListener();
    registerRefChangedListener();
  }

  private void registerIndexDiffChangeListener() {
    IndexDiffCacheEntry entry = org.eclipse.egit.core.Activator
        .getDefault().getIndexDiffCache()
        .getIndexDiffCacheEntry(this.repository);

    entry.addIndexDiffChangedListener(this);
  }
View Full Code Here


    entry.addIndexDiffChangedListener(this);
  }

  private void unregisterIndexDiffChangeListener() {
    IndexDiffCacheEntry entry = org.eclipse.egit.core.Activator
        .getDefault().getIndexDiffCache()
        .getIndexDiffCacheEntry(this.repository);

    entry.removeIndexDiffChangedListener(this);
  }
View Full Code Here

  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() {
      public void indexDiffChanged(Repository repo,
          IndexDiffData indexDiffData) {
        listenerCalled.set(true);
        indexDiffDataResult.set(indexDiffData);
      }
View Full Code Here

    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())
      return false;

    for (String selectedRepoPath : selectedRepoPaths) {
      Path selectedPath = new Path(selectedRepoPath);
View Full Code Here

  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

      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)
        continue;

      if (hasAnyPathChanged(paths, indexDiff))
        return super.promptForInputChange(requestPreviewMessage,
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

  }

  private IndexDiffData doReload(final Repository repository) {
    currentRepository = repository;

    IndexDiffCacheEntry entry = org.eclipse.egit.core.Activator.getDefault().getIndexDiffCache().getIndexDiffCacheEntry(currentRepository);

    if(cacheEntry != null && cacheEntry != entry)
      cacheEntry.removeIndexDiffChangedListener(myIndexDiffListener);

    cacheEntry = entry;
View Full Code Here

      return false;

    if (!repository.getRepositoryState().canCommit())
      return false;

    IndexDiffCacheEntry entry = Activator.getDefault()
        .getIndexDiffCache().getIndexDiffCacheEntry(repository);
    if (entry == null)
      return false;

    IndexDiffData diff = entry.getIndexDiff();
    if (diff == null)
      return false;

    if (diff.getAdded().isEmpty() && diff.getChanged().isEmpty()
        && diff.getRemoved().isEmpty() && diff.getUntracked().isEmpty()
View Full Code Here

      return false;

    String repoRelativePath = map.getRepoRelativePath(file);
    IndexDiffCache indexDiffCache = Activator.getDefault()
        .getIndexDiffCache();
    IndexDiffCacheEntry indexDiffCacheEntry = indexDiffCache
        .getIndexDiffCacheEntry(map.getRepository());
    IndexDiffData indexDiff = indexDiffCacheEntry.getIndexDiff();
    if (indexDiff != null) {
      if (indexDiff.getUntracked().contains(repoRelativePath))
        return false;
      if (indexDiff.getIgnoredNotInIndex().contains(repoRelativePath))
        return false;
View Full Code Here

TOP

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

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.