VCS: no big wrapping read action for deleted files holder
[idea/community.git] / platform / vcs-impl / src / com / intellij / openapi / vcs / changes / DeletedFilesHolder.java
index c545d40b81a13f967f70b71decd87a69bc40e742..acb851894f4e8bc2b6a0361c73fe00b2eadf9e46 100644 (file)
  */
 package com.intellij.openapi.vcs.changes;
 
-import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.vcs.FilePath;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @author max
@@ -36,19 +38,15 @@ public class DeletedFilesHolder implements FileHolder {
   }
 
   public void cleanScope(final VcsDirtyScope scope) {
-    ApplicationManager.getApplication().runReadAction(new Runnable() {
-      public void run() {
-        if (scope == null) {
-          myFiles.clear();
-        }
-        final List<LocallyDeletedChange> currentFiles = new ArrayList<LocallyDeletedChange>(myFiles.values());
-        for (LocallyDeletedChange change : currentFiles) {
-          if (scope.belongsTo(change.getPath())) {
-            myFiles.remove(change.getPresentableUrl());
-          }
-        }
+    if (scope == null) {
+      myFiles.clear();
+    }
+    final List<LocallyDeletedChange> currentFiles = new ArrayList<LocallyDeletedChange>(myFiles.values());
+    for (LocallyDeletedChange change : currentFiles) {
+      if (scope.belongsTo(change.getPath())) {
+        myFiles.remove(change.getPresentableUrl());
       }
-    });
+    }
   }
 
   public HolderType getType() {