commit all documents from EDT

This commit is contained in:
unknown
2010-07-05 14:55:31 +04:00
committed by anna
parent 277a3bd31a
commit 17a9e105a8
@@ -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();