use of org.jetbrains.jps.incremental.fs.FilesDelta in project intellij-community by JetBrains.
the class IncProjectBuilder method checkUpToDate.
public void checkUpToDate(CompileScope scope) {
CompileContextImpl context = null;
try {
context = createContext(scope);
final BuildFSState fsState = myProjectDescriptor.fsState;
for (BuildTarget<?> target : myProjectDescriptor.getBuildTargetIndex().getAllTargets()) {
if (scope.isAffected(target)) {
BuildOperations.ensureFSStateInitialized(context, target);
final FilesDelta delta = fsState.getEffectiveFilesDelta(context, target);
delta.lockData();
try {
for (Set<File> files : delta.getSourcesToRecompile().values()) {
for (File file : files) {
if (scope.isAffected(target, file)) {
// this will serve as a marker that compiler has work to do
myMessageDispatcher.processMessage(DoneSomethingNotification.INSTANCE);
return;
}
}
}
} finally {
delta.unlockData();
}
}
}
} catch (Exception e) {
LOG.info(e);
// this will serve as a marker that compiler has work to do
myMessageDispatcher.processMessage(DoneSomethingNotification.INSTANCE);
} finally {
if (context != null) {
flushContext(context);
}
}
}
Aggregations