mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 06:05:01 +07:00
optimize imports on refactoring shouldn't lead to deadlocks (like IDEA-162441) if invoked in dumb mode
This commit is contained in:
@@ -16,10 +16,10 @@
|
||||
package com.intellij.refactoring;
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ReadAction;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.project.DumbService;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.*;
|
||||
@@ -61,7 +61,7 @@ public class OptimizeImportsRefactoringHelper implements RefactoringHelper<Set<P
|
||||
});
|
||||
|
||||
final Set<SmartPsiElementPointer<PsiImportStatementBase>> redundants = new HashSet<>();
|
||||
final Runnable findRedundantImports = () -> DumbService.getInstance(project).runReadActionInSmartMode(() -> {
|
||||
final Runnable findRedundantImports = () -> ReadAction.run(() -> {
|
||||
final JavaCodeStyleManager styleManager = JavaCodeStyleManager.getInstance(project);
|
||||
final ProgressIndicator progressIndicator = ProgressManager.getInstance().getProgressIndicator();
|
||||
final SmartPointerManager pointerManager = SmartPointerManager.getInstance(project);
|
||||
|
||||
Reference in New Issue
Block a user