Source:
public DirCacheResourceVariantTreeProvider(Repository repository) throws IOException { final DirCache cache = repository.readDirCache(); final GitResourceVariantCache baseCache = new GitResourceVariantCache(); final GitResourceVariantCache sourceCache = new GitResourceVariantCache(); final GitResourceVariantCache remoteCache = new GitResourceVariantCache(); for (int i = 0; i < cache.getEntryCount(); i++) { final DirCacheEntry entry = cache.getEntry(i); final IPath path = new Path(entry.getPathString()); final IResource resource = ResourceUtil .getResourceHandleForLocation(path); if (resource == null || !resource.getProject().isAccessible()) continue; switch (entry.getStage()) { case DirCacheEntry.STAGE_1: baseCache.setVariant(resource, IndexResourceVariant.create(repository, entry)); break; case DirCacheEntry.STAGE_2: sourceCache.setVariant(resource, IndexResourceVariant.create(repository, entry)); break; case DirCacheEntry.STAGE_3: remoteCache.setVariant(resource, IndexResourceVariant.create(repository, entry)); break; default: break; } } baseTree = new GitCachedResourceVariantTree(baseCache); sourceTree = new GitCachedResourceVariantTree(sourceCache); remoteTree = new GitCachedResourceVariantTree(remoteCache); roots = new LinkedHashSet<IResource>(); roots.addAll(baseCache.getRoots()); roots.addAll(sourceCache.getRoots()); roots.addAll(remoteCache.getRoots()); knownResources = new LinkedHashSet<IResource>(); knownResources.addAll(baseCache.getKnownResources()); knownResources.addAll(sourceCache.getKnownResources()); knownResources.addAll(remoteCache.getKnownResources()); }

Target:
public DirCacheResourceVariantTreeProvider(Repository repository) throws IOException { final DirCache cache = repository.readDirCache(); final GitResourceVariantCache baseCache = new GitResourceVariantCache(); final GitResourceVariantCache sourceCache = new GitResourceVariantCache(); final GitResourceVariantCache remoteCache = new GitResourceVariantCache(); for (int i = 0; i < cache.getEntryCount(); i++) { final DirCacheEntry entry = cache.getEntry(i); final IPath path = new Path(entry.getPathString()); final IResource resource = ResourceUtil .getResourceHandleForLocation(path); if (resource == null || resource.getProject() == null || !resource.getProject().isAccessible()) { continue; } switch (entry.getStage()) { case DirCacheEntry.STAGE_1: baseCache.setVariant(resource, IndexResourceVariant.create(repository, entry)); break; case DirCacheEntry.STAGE_2: sourceCache.setVariant(resource, IndexResourceVariant.create(repository, entry)); break; case DirCacheEntry.STAGE_3: remoteCache.setVariant(resource, IndexResourceVariant.create(repository, entry)); break; case DirCacheEntry.STAGE_0: default: break; } } baseTree = new GitCachedResourceVariantTree(baseCache); sourceTree = new GitCachedResourceVariantTree(sourceCache); remoteTree = new GitCachedResourceVariantTree(remoteCache); roots = new LinkedHashSet<IResource>(); roots.addAll(baseCache.getRoots()); roots.addAll(sourceCache.getRoots()); roots.addAll(remoteCache.getRoots()); knownResources = new LinkedHashSet<IResource>(); knownResources.addAll(baseCache.getKnownResources()); knownResources.addAll(sourceCache.getKnownResources()); knownResources.addAll(remoteCache.getKnownResources()); }