IDEA-162171 fix duplicated code and remove unused method
authorSergey Malenkov <sergey.malenkov@jetbrains.com>
Tue, 11 Oct 2016 13:10:47 +0000 (16:10 +0300)
committerSergey Malenkov <sergey.malenkov@jetbrains.com>
Tue, 11 Oct 2016 16:46:20 +0000 (19:46 +0300)
platform/platform-impl/src/com/intellij/openapi/fileChooser/ex/FileChooserDialogImpl.java

index 110a0eca29abc829f479186870afb4a6fcdbeb9d..9fb0645567d588d93d6f25f46ab4b54e1be6c5d3 100644 (file)
@@ -703,8 +703,7 @@ public class FileChooserDialogImpl extends DialogWrapper implements FileChooserD
           }
         }
 
-        myTreeIsUpdating = false;
-        setErrorText(null);
+        reportFileNotFound();
         updatePathFromTree(fileList, true);
         if (requestFocus) {
           //noinspection SSBasedInspection
@@ -713,8 +712,7 @@ public class FileChooserDialogImpl extends DialogWrapper implements FileChooserD
       });
     }
     else {
-      myTreeIsUpdating = false;
-      setErrorText(null);
+      reportFileNotFound();
       updatePathFromTree(fileList, true);
     }
   }
@@ -724,16 +722,6 @@ public class FileChooserDialogImpl extends DialogWrapper implements FileChooserD
     setErrorText(null);
   }
 
-  private boolean allFilesSelected(VirtualFile[] files) {
-    VirtualFile[] selectedFiles = myFileSystemTree.getSelectedFiles();
-    for (VirtualFile file : files) {
-      if (!ArrayUtil.contains(file, selectedFiles)) {
-        return false;
-      }
-    }
-    return true;
-  }
-
   @Override
   protected String getDimensionServiceKey() {
     return "FileChooserDialogImpl";