eliminate progress flickering

This commit is contained in:
Eugene Zhuravlev
2010-04-06 10:41:57 +04:00
parent 6ae43d6012
commit 7697c66499
@@ -1591,7 +1591,6 @@ public class CompileDriver {
}
private static boolean syncOutputDir(final CompileContextEx context, final Collection<Trinity<File, String, Boolean>> toDelete) throws CacheCorruptedException {
final int total = toDelete.size();
final DependencyCache dependencyCache = context.getDependencyCache();
final boolean isTestMode = ApplicationManager.getApplication().isUnitTestMode();
@@ -1601,11 +1600,9 @@ public class CompileDriver {
public void run() throws CacheCorruptedException {
final long start = System.currentTimeMillis();
try {
int current = 0;
for (final Trinity<File, String, Boolean> trinity : toDelete) {
final File outputPath = trinity.getFirst();
context.getProgressIndicator().checkCanceled();
context.getProgressIndicator().setFraction((double)++current / total);
context.getProgressIndicator().setText2(outputPath.getPath());
filesToRefresh.add(outputPath);
if (isTestMode) {