mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
reduce the number of force() calls on storages
This commit is contained in:
@@ -210,6 +210,10 @@ public class CompileContext extends UserDataHolderBase implements MessageHandler
|
||||
return myDataManager;
|
||||
}
|
||||
|
||||
public TimestampStorage getTimestampStorage() {
|
||||
return myTsStorage;
|
||||
}
|
||||
|
||||
public void processMessage(BuildMessage msg) {
|
||||
if (msg.getKind() == BuildMessage.Kind.ERROR) {
|
||||
myErrorsFound = true;
|
||||
|
||||
@@ -102,6 +102,10 @@ public class IncProjectBuilder {
|
||||
}
|
||||
|
||||
private static void flushContext(CompileContext context) {
|
||||
if (context != null) {
|
||||
context.getTimestampStorage().force();
|
||||
context.getDataManager().flush(false);
|
||||
}
|
||||
final ExternalJavacDescriptor descriptor = ExternalJavacDescriptor.KEY.get(context);
|
||||
if (descriptor != null) {
|
||||
try {
|
||||
|
||||
@@ -53,9 +53,5 @@ public final class ProjectDescriptor {
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
timestamps.getStorage().force();
|
||||
dataManager.flush(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user