mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
commit all documents from EDT
This commit is contained in:
@@ -48,13 +48,13 @@ public class OptimizeImportsRefactoringHelper implements RefactoringHelper<Set<P
|
||||
}
|
||||
|
||||
public void performOperation(final Project project, final Set<PsiJavaFile> javaFiles) {
|
||||
PsiDocumentManager.getInstance(project).commitAllDocuments();
|
||||
final Set<SmartPsiElementPointer<PsiImportStatementBase>> redundants = new HashSet<SmartPsiElementPointer<PsiImportStatementBase>>();
|
||||
final Runnable findRedundantImports = new Runnable() {
|
||||
public void run() {
|
||||
final JavaCodeStyleManager styleManager = JavaCodeStyleManager.getInstance(project);
|
||||
final ProgressIndicator progressIndicator = ProgressManager.getInstance().getProgressIndicator();
|
||||
final SmartPointerManager pointerManager = SmartPointerManager.getInstance(project);
|
||||
PsiDocumentManager.getInstance(project).commitAllDocuments();
|
||||
for (PsiJavaFile file : javaFiles) {
|
||||
if (file.isValid()) {
|
||||
final VirtualFile virtualFile = file.getVirtualFile();
|
||||
|
||||
Reference in New Issue
Block a user