don't show project icon if path is accepted by PlatformProjectOpenProcessor (it accep...
authorDmitry Jemerov <yole@jetbrains.com>
Mon, 5 Jul 2010 09:45:51 +0000 (13:45 +0400)
committerDmitry Jemerov <yole@jetbrains.com>
Mon, 5 Jul 2010 11:06:56 +0000 (15:06 +0400)
platform/platform-impl/src/com/intellij/ide/actions/OpenProjectFileChooserDescriptor.java

index a6eceb61ec33dae8eed94ad87bef738419a2f77d..30116458dad5340f339d32e36f5b67906112361d 100644 (file)
@@ -22,6 +22,7 @@ import com.intellij.openapi.fileChooser.FileElement;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.util.IconLoader;
 import com.intellij.openapi.vfs.VirtualFile;
+import com.intellij.platform.PlatformProjectOpenProcessor;
 import com.intellij.projectImport.ProjectOpenProcessor;
 import org.jetbrains.annotations.Nullable;
 
@@ -71,8 +72,14 @@ public class OpenProjectFileChooserDescriptor extends FileChooserDescriptor {
   }
 
   private static boolean isProjectFile(final VirtualFile file) {
-    return (!file.isDirectory() && file.getName().toLowerCase().endsWith(ProjectFileType.DOT_DEFAULT_EXTENSION)) ||
-           (ProjectOpenProcessor.getImportProvider(file) != null);
+    if ((!file.isDirectory() && file.getName().toLowerCase().endsWith(ProjectFileType.DOT_DEFAULT_EXTENSION))) {
+      return true;
+    }
+    final ProjectOpenProcessor importProvider = ProjectOpenProcessor.getImportProvider(file);
+    if (importProvider != null && !(importProvider instanceof PlatformProjectOpenProcessor)) {
+      return true;
+    }
+    return false;
   }
 
   private static boolean isProjectDirectory(final VirtualFile virtualFile) {