for (IPath next : indexablesWithChanges) { FingerprintTestResult nextFingerprint = fingerprints.get(next); totalSizeToIndex += nextFingerprint.getNewFingerprint().getSize(); for (IPath next : indexablesWithChanges) { FingerprintTestResult nextFingerprint = fingerprints.get(next); int ticks = (int) (nextFingerprint.getNewFingerprint().getSize() * tickCoefficient); fingerprints.get(next).getNewFingerprint(), loopMonitor.split(ticks));
/** * Given a list of fragment roots, returns the subset of roots that have changed since the last time they were * indexed. */ private List<IPath> getIndexablesThatHaveChanged(Collection<IPath> indexables, Map<IPath, FingerprintTestResult> fingerprints) { List<IPath> indexablesWithChanges = new ArrayList<>(); for (IPath next : indexables) { FingerprintTestResult testResult = fingerprints.get(next); if (!testResult.matches()) { indexablesWithChanges.add(next); } } return indexablesWithChanges; }
for (IPath next : indexablesWithChanges) { FingerprintTestResult nextFingerprint = fingerprints.get(next); totalSizeToIndex += nextFingerprint.getNewFingerprint().getSize(); for (IPath next : indexablesWithChanges) { FingerprintTestResult nextFingerprint = fingerprints.get(next); int ticks = (int) (nextFingerprint.getNewFingerprint().getSize() * tickCoefficient); fingerprints.get(next).getNewFingerprint(), loopMonitor.split(ticks));
subMonitor.split(5); if (lastModified != UNKNOWN && lastModified == this.time && fileSize == this.size) { return new FingerprintTestResult(true, false, this); return new FingerprintTestResult(matches, !equals(newFingerprint), newFingerprint);
if (resourceFile != null && result.matches() && result.needsNewFingerprint()) { this.nd.acquireWriteLock(subMonitor.split(10)); try { if (DEBUG) { Package.logInfo( "Writing updated fingerprint for " + thePath + ": " + result.getNewFingerprint()); //$NON-NLS-1$//$NON-NLS-2$ resourceFile.setFingerprint(result.getNewFingerprint());
subMonitor.split(5); if (lastModified != UNKNOWN && lastModified == this.time && fileSize == this.size) { return new FingerprintTestResult(true, false, this); return new FingerprintTestResult(matches, !equals(newFingerprint), newFingerprint);
if (resourceFile != null && result.matches() && result.needsNewFingerprint()) { this.nd.acquireWriteLock(subMonitor.split(10)); try { if (DEBUG) { Package.logInfo( "Writing updated fingerprint for " + thePath + ": " + result.getNewFingerprint()); //$NON-NLS-1$//$NON-NLS-2$ resourceFile.setFingerprint(result.getNewFingerprint());
/** * Returns true iff the given resource file is up-to-date with the filesystem. Returns false * if the argument is null or there is a possibility it being out-of-date with the file system. * * @param file the index file to look up or null * @throws CoreException */ public boolean isUpToDate(NdResourceFile file) throws CoreException { if (file != null && file.isDoneIndexing()) { String location = file.getLocation().getString(); FileStateCache cache = FileStateCache.getCache(getNd()); Boolean cachedResult = cache.isUpToDate(location); if (cachedResult != null) { return cachedResult; } Path locationPath = new Path(location); boolean result = file.getFingerprint().test(locationPath, null).matches(); cache.put(location, result); return result; } return false; }
/** * Returns true iff the given resource file is up-to-date with the filesystem. Returns false * if the argument is null or there is a possibility it being out-of-date with the file system. * * @param file the index file to look up or null * @throws CoreException */ public boolean isUpToDate(NdResourceFile file) throws CoreException { if (file != null && file.isDoneIndexing()) { String location = file.getLocation().getString(); FileStateCache cache = FileStateCache.getCache(getNd()); Boolean cachedResult = cache.isUpToDate(location); if (cachedResult != null) { return cachedResult; } Path locationPath = new Path(location); boolean result = file.getFingerprint().test(locationPath, null).matches(); cache.put(location, result); return result; } return false; }
/** * Given a list of fragment roots, returns the subset of roots that have changed since the last time they were * indexed. */ private List<IPath> getIndexablesThatHaveChanged(Collection<IPath> indexables, Map<IPath, FingerprintTestResult> fingerprints) { List<IPath> indexablesWithChanges = new ArrayList<>(); for (IPath next : indexables) { FingerprintTestResult testResult = fingerprints.get(next); if (!testResult.matches()) { indexablesWithChanges.add(next); } } return indexablesWithChanges; }
public static final FileFingerprint create(IPath path, IProgressMonitor monitor) throws CoreException { return getEmpty().test(path, monitor).getNewFingerprint(); }
public static final FileFingerprint create(IPath path, IProgressMonitor monitor) throws CoreException { return getEmpty().test(path, monitor).getNewFingerprint(); }