From 7999dc8d019430ce1e0dd8cc73dc510c9e22474d Mon Sep 17 00:00:00 2001 From: Sergey Mashkov Date: Mon, 6 Jun 2016 14:50:01 +0300 Subject: [PATCH] Fix EA-83601 - ISE: PomFile. --- .../kotlin/idea/maven/actions/MavenPluginSourcesSwap.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/actions/MavenPluginSourcesSwap.kt b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/actions/MavenPluginSourcesSwap.kt index a87d744a2be..f95ed06d0d7 100644 --- a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/actions/MavenPluginSourcesSwap.kt +++ b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/actions/MavenPluginSourcesSwap.kt @@ -50,6 +50,10 @@ class MavenPluginSourcesMoveToExecutionIntention : PsiElementBaseIntentionAction return false } + if (MavenDomUtil.getMavenDomProjectModel(project, file.virtualFile) == null) { + return false + } + val pom = PomFile(file as XmlFile) if (domElement.getParentOfType(MavenDomBuild::class.java, false)?.sourceDirectory === domElement) { return pom.findKotlinExecutions(PomFile.KotlinGoals.Compile, PomFile.KotlinGoals.Js).isNotEmpty()