progress indicators are indeterminate by default

more indicators fixed
This commit is contained in:
Dmitry Avdeev
2017-10-23 16:41:22 +03:00
parent 931f2a9315
commit d78389e7d8
4 changed files with 6 additions and 0 deletions
@@ -58,6 +58,9 @@ public class OptimizeImportsRefactoringHelper implements RefactoringHelper<Set<P
final Runnable findRedundantImports = () -> ReadAction.run(() -> {
final JavaCodeStyleManager styleManager = JavaCodeStyleManager.getInstance(project);
final ProgressIndicator progressIndicator = ProgressManager.getInstance().getProgressIndicator();
if (progressIndicator != null) {
progressIndicator.setIndeterminate(false);
}
final SmartPointerManager pointerManager = SmartPointerManager.getInstance(project);
int i = 0;
final int fileCount = javaFiles.size();
@@ -375,6 +375,7 @@ public abstract class AbstractLayoutCodeProcessor {
private void runProcessFiles(@NotNull final FileTreeIterator fileIterator) {
boolean isSuccess = ProgressManager.getInstance().runProcessWithProgressSynchronously(() -> {
ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator();
indicator.setIndeterminate(false);
ReformatFilesTask task = new ReformatFilesTask(fileIterator, indicator);
while (!task.isDone()) {
task.iteration();
@@ -936,6 +936,7 @@ public class GlobalInspectionContextImpl extends GlobalInspectionContextBase imp
setCurrentScope(scope);
final int fileCount = scope.getFileCount();
final ProgressIndicator progressIndicator = ProgressManager.getInstance().getProgressIndicator();
progressIndicator.setIndeterminate(false);
final SearchScope searchScope = ReadAction.compute(scope::toSearchScope);
final TextRange range;
@@ -56,6 +56,7 @@ public abstract class PerformFixesModalTask implements SequentialTask {
}
public void doRun(ProgressIndicator indicator) {
indicator.setIndeterminate(false);
while (!isDone()) {
if (indicator.isCanceled()) {
break;