From f27896ee56f69edfea332d4e904f2b4f882d915b Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Mon, 15 Oct 2012 12:46:37 +0400 Subject: [PATCH] Better checking for isMavenModule() --- .../ConfigureKotlinLibraryNotificationProvider.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/idea/src/org/jetbrains/jet/plugin/quickfix/ConfigureKotlinLibraryNotificationProvider.java b/idea/src/org/jetbrains/jet/plugin/quickfix/ConfigureKotlinLibraryNotificationProvider.java index 3d8c9e49625..70fd9306a7c 100644 --- a/idea/src/org/jetbrains/jet/plugin/quickfix/ConfigureKotlinLibraryNotificationProvider.java +++ b/idea/src/org/jetbrains/jet/plugin/quickfix/ConfigureKotlinLibraryNotificationProvider.java @@ -257,11 +257,9 @@ public class ConfigureKotlinLibraryNotificationProvider implements EditorNotific } private static boolean isMavenModule(@NotNull Module module) { - for (VirtualFile root : ModuleRootManager.getInstance(module).getContentRoots()) { - if (root.findChild("pom.xml") != null) return true; - } - - return false; + // This constant could be acquired from MavenProjectsManager, but we don't want to depend on the Maven plugin... + // See MavenProjectsManager.isMavenizedModule() + return "true".equals(module.getOptionValue("org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule")); } private static class ChoosePathDialog extends DialogWrapper {