EA-91810 - assert: NoSwingUnderWriteAction.lambda$watchForEvents$
[idea/community.git] / platform / lang-impl / src / com / intellij / refactoring / move / moveFilesOrDirectories / MoveFilesOrDirectoriesUtil.java
index fb1e9471fe6d4b4b8c6448d3a1447bf51163d2f8..9ffdc237f2b2c1668ad3bffa3ca8dc495cf217fd 100644 (file)
@@ -22,7 +22,6 @@ import com.intellij.openapi.command.CommandProcessor;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.ui.DialogWrapper;
-import com.intellij.openapi.util.Computable;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.*;
 import com.intellij.refactoring.RefactoringBundle;
@@ -153,13 +152,7 @@ public class MoveFilesOrDirectoriesUtil {
             for (final PsiElement psiElement : newElements) {
               if (psiElement instanceof PsiFile) {
                 final PsiFile file = (PsiFile)psiElement;
-                final boolean fileExist = ApplicationManager.getApplication().runWriteAction(new Computable<Boolean>() {
-                  @Override
-                  public Boolean compute() {
-                    return CopyFilesOrDirectoriesHandler.checkFileExist(targetDirectory1, choice, file, file.getName(), "Move");
-                  }
-                });
-                if (fileExist) continue;
+                if (CopyFilesOrDirectoriesHandler.checkFileExist(targetDirectory1, choice, file, file.getName(), "Move")) continue;
               }
               checkMove(psiElement, targetDirectory1);
               els.add(psiElement);