hide "remove module" in IDEs other than IDEA which don't have attach capability ...
authorDmitry Jemerov <yole@jetbrains.com>
Wed, 1 Feb 2012 13:59:15 +0000 (14:59 +0100)
committerDmitry Jemerov <yole@jetbrains.com>
Wed, 1 Feb 2012 13:59:15 +0000 (14:59 +0100)
platform/lang-impl/src/com/intellij/openapi/roots/ui/configuration/actions/ModuleDeleteProvider.java

index 9b71e4757b8f0a113ce1fa3e88dca94126c5c630..83fbc587b7399b3619fce0493c572488f3573f51 100644 (file)
@@ -34,6 +34,7 @@ import com.intellij.openapi.util.text.StringUtil;
 import com.intellij.projectImport.ProjectAttachProcessor;
 import com.intellij.util.ArrayUtil;
 import com.intellij.util.Function;
+import com.intellij.util.PlatformUtils;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -51,7 +52,7 @@ public class ModuleDeleteProvider  implements DeleteProvider, TitledHandler  {
 
   private static boolean isPrimaryModule(Module[] modules) {
     if (!ProjectAttachProcessor.canAttachToProject()) {
-      return false;
+      return !PlatformUtils.isIdea();
     }
     for (Module module : modules) {
       final File moduleFile = new File(module.getModuleFilePath());