diff --git a/idea/idea-maven/resources/inspectionDescriptions/SameVersionIDEPlugin.html b/idea/idea-maven/resources/inspectionDescriptions/DifferentKotlinMavenVersion.html similarity index 100% rename from idea/idea-maven/resources/inspectionDescriptions/SameVersionIDEPlugin.html rename to idea/idea-maven/resources/inspectionDescriptions/DifferentKotlinMavenVersion.html diff --git a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/SameVersionIDEPluginInspection.kt b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/DifferentKotlinMavenVersionInspection.kt similarity index 95% rename from idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/SameVersionIDEPluginInspection.kt rename to idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/DifferentKotlinMavenVersionInspection.kt index 94d89cad3e6..b9db18ada1e 100644 --- a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/SameVersionIDEPluginInspection.kt +++ b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/DifferentKotlinMavenVersionInspection.kt @@ -27,7 +27,7 @@ import org.jetbrains.idea.maven.project.MavenProjectsManager import org.jetbrains.kotlin.idea.maven.PomFile import org.jetbrains.kotlin.idea.versions.bundledRuntimeVersion -class SameVersionIDEPluginInspection : DomElementsInspection(MavenDomProjectModel::class.java) { +class DifferentKotlinMavenVersionInspection : DomElementsInspection(MavenDomProjectModel::class.java) { private val idePluginVersion by lazy { bundledRuntimeVersion() } var testVersionMessage: String? = null diff --git a/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/AbstractKotlinMavenInspectionTest.kt b/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/AbstractKotlinMavenInspectionTest.kt index 94f4fba2aaf..a09ccf4b9ed 100644 --- a/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/AbstractKotlinMavenInspectionTest.kt +++ b/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/AbstractKotlinMavenInspectionTest.kt @@ -37,7 +37,7 @@ import com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl import com.intellij.util.indexing.FileBasedIndex import org.jetbrains.jps.model.java.JavaSourceRootType import org.jetbrains.kotlin.idea.maven.inspections.KotlinMavenPluginPhaseInspection -import org.jetbrains.kotlin.idea.maven.inspections.SameVersionIDEPluginInspection +import org.jetbrains.kotlin.idea.maven.inspections.DifferentKotlinMavenVersionInspection import org.jetbrains.kotlin.idea.refactoring.toPsiDirectory import org.jetbrains.kotlin.idea.util.projectStructure.allModules import java.io.File @@ -156,7 +156,7 @@ abstract class AbstractKotlinMavenInspectionTest : MavenImportingTestCase() { val toolWrapper = LocalInspectionToolWrapper(inspectionClass.newInstance() as LocalInspectionTool) val tool = toolWrapper.tool - if (tool is SameVersionIDEPluginInspection) { + if (tool is DifferentKotlinMavenVersionInspection) { tool.testVersionMessage = "\$PLUGIN_VERSION" } diff --git a/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/KotlinMavenInspectionTestGenerated.java b/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/KotlinMavenInspectionTestGenerated.java index f9777f380ea..b87295fee6e 100644 --- a/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/KotlinMavenInspectionTestGenerated.java +++ b/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/KotlinMavenInspectionTestGenerated.java @@ -53,6 +53,12 @@ public class KotlinMavenInspectionTestGenerated extends AbstractKotlinMavenInspe doTest(fileName); } + @TestMetadata("ideAndMavenVersionsSuppression.xml") + public void testIdeAndMavenVersionsSuppression() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/maven-inspections/ideAndMavenVersionsSuppression.xml"); + doTest(fileName); + } + @TestMetadata("kotlinTestWithJunit.xml") public void testKotlinTestWithJunit() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/maven-inspections/kotlinTestWithJunit.xml"); diff --git a/idea/idea-maven/testData/maven-inspections/ideAndMavenVersions.xml b/idea/idea-maven/testData/maven-inspections/ideAndMavenVersions.xml index 4b57f361bf6..d2d9a86096f 100644 --- a/idea/idea-maven/testData/maven-inspections/ideAndMavenVersions.xml +++ b/idea/idea-maven/testData/maven-inspections/ideAndMavenVersions.xml @@ -31,5 +31,5 @@ - + \ No newline at end of file diff --git a/idea/idea-maven/testData/maven-inspections/ideAndMavenVersionsSuppression.xml b/idea/idea-maven/testData/maven-inspections/ideAndMavenVersionsSuppression.xml new file mode 100644 index 00000000000..9a064ccb427 --- /dev/null +++ b/idea/idea-maven/testData/maven-inspections/ideAndMavenVersionsSuppression.xml @@ -0,0 +1,35 @@ + + + 4.0.0 + + org.jetbrains.kotlin.test + configure-maven-test + 1.0-SNAPSHOT + + + 1.0.0 + + + + + org.jetbrains.kotlin + kotlin-stdlib + ${kotlin.version} + + + + + + + org.jetbrains.kotlin + kotlin-maven-plugin + + ${kotlin.version} + + + + + + \ No newline at end of file diff --git a/idea/src/META-INF/maven.xml b/idea/src/META-INF/maven.xml index f5bfd1694b3..d75ec1828e0 100644 --- a/idea/src/META-INF/maven.xml +++ b/idea/src/META-INF/maven.xml @@ -44,7 +44,7 @@ hasStaticDescription="true" level="WARNING" /> -