From 29097396edd0bfee5deb363e9c6e9f412737388a Mon Sep 17 00:00:00 2001 From: nik Date: Wed, 19 Oct 2011 15:58:14 +0400 Subject: [PATCH] detect facet only in suitable modules --- .../detection/impl/FrameworkDetectionContextImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/framework/detection/impl/FrameworkDetectionContextImpl.java b/platform/lang-impl/src/com/intellij/framework/detection/impl/FrameworkDetectionContextImpl.java index da3ace0cc82b..3ebd09857481 100644 --- a/platform/lang-impl/src/com/intellij/framework/detection/impl/FrameworkDetectionContextImpl.java +++ b/platform/lang-impl/src/com/intellij/framework/detection/impl/FrameworkDetectionContextImpl.java @@ -22,6 +22,7 @@ import com.intellij.facet.impl.DefaultFacetsProvider; import com.intellij.framework.detection.DetectedFrameworkDescription; import com.intellij.framework.detection.FacetBasedFrameworkDetector; import com.intellij.openapi.module.Module; +import com.intellij.openapi.module.ModuleType; import com.intellij.openapi.module.ModuleUtil; import com.intellij.openapi.project.Project; import com.intellij.openapi.roots.ui.configuration.FacetsProvider; @@ -61,7 +62,7 @@ public class FrameworkDetectionContextImpl extends FrameworkDetectionContextBase final FacetsProvider provider = DefaultFacetsProvider.INSTANCE; for (Module module : filesByModule.keySet()) { final Collection facets = provider.getFacetsByType(module, facetType.getId()); - if (facetType.isOnlyOneFacetAllowed() && !facets.isEmpty()) { + if (!facetType.isSuitableModuleType(ModuleType.get(module)) || facetType.isOnlyOneFacetAllowed() && !facets.isEmpty()) { continue; } List existentConfigurations = new ArrayList();