diff --git a/idea/idea-maven/resources/inspectionDescriptions/KotlinTestJUnit.html b/idea/idea-maven/resources/inspectionDescriptions/KotlinTestJUnit.html new file mode 100644 index 00000000000..f30d680dd16 --- /dev/null +++ b/idea/idea-maven/resources/inspectionDescriptions/KotlinTestJUnit.html @@ -0,0 +1,6 @@ + + +If you have kotlin-test and junit dependency +then most likely you better to include kotlin-test-junit instead of just kotlin-test + + \ No newline at end of file diff --git a/idea/idea-maven/resources/inspectionDescriptions/SameVersion.html b/idea/idea-maven/resources/inspectionDescriptions/SameVersion.html new file mode 100644 index 00000000000..01176e21825 --- /dev/null +++ b/idea/idea-maven/resources/inspectionDescriptions/SameVersion.html @@ -0,0 +1,5 @@ + + +Reports different kotlin stdlib and compiler versions that could lead to unpredictable issues + + \ No newline at end of file diff --git a/idea/idea-maven/resources/inspectionDescriptions/SameVersionIDEPlugin.html b/idea/idea-maven/resources/inspectionDescriptions/SameVersionIDEPlugin.html new file mode 100644 index 00000000000..5e1091f7cd3 --- /dev/null +++ b/idea/idea-maven/resources/inspectionDescriptions/SameVersionIDEPlugin.html @@ -0,0 +1,6 @@ + + + Reports different IDE and Maven plugin versions that can lead do different + behaviour of your code + + \ No newline at end of file diff --git a/idea/idea-maven/resources/intentionDescriptions/MavenPluginSourcesMoveToBuild/description.html b/idea/idea-maven/resources/intentionDescriptions/MavenPluginSourcesMoveToBuild/description.html index a0d58e87d94..5807f6b1a15 100644 --- a/idea/idea-maven/resources/intentionDescriptions/MavenPluginSourcesMoveToBuild/description.html +++ b/idea/idea-maven/resources/intentionDescriptions/MavenPluginSourcesMoveToBuild/description.html @@ -1,5 +1,5 @@ -This intention moves source directory from execution's configuration to build the corresponding source directory tag +Move source directory from execution's configuration to build the corresponding source directory tag \ No newline at end of file diff --git a/idea/idea-maven/resources/intentionDescriptions/MavenPluginSourcesMoveToExecutionIntention/description.html b/idea/idea-maven/resources/intentionDescriptions/MavenPluginSourcesMoveToExecutionIntention/description.html index 2d7bf675eb1..90d46776987 100644 --- a/idea/idea-maven/resources/intentionDescriptions/MavenPluginSourcesMoveToExecutionIntention/description.html +++ b/idea/idea-maven/resources/intentionDescriptions/MavenPluginSourcesMoveToExecutionIntention/description.html @@ -1,6 +1,6 @@ -This intention moves source directory from build source directory tag +Move source directory from build source directory tag to the corresponding kotlin-maven-plugin execution's configuration \ No newline at end of file diff --git a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/actions/MavenActionsGroup.kt b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/actions/MavenPomActions.kt similarity index 89% rename from idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/actions/MavenActionsGroup.kt rename to idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/actions/MavenPomActions.kt index 7c85ce4c763..8e50fa2d9e4 100644 --- a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/actions/MavenActionsGroup.kt +++ b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/actions/MavenPomActions.kt @@ -33,8 +33,8 @@ import org.jetbrains.kotlin.idea.maven.configuration.KotlinJavaMavenConfigurator import org.jetbrains.kotlin.idea.maven.configuration.KotlinMavenConfigurator import org.jetbrains.kotlin.psi.psiUtil.endOffset -class GenerateMavenCompileExecutionAction : PomFileActionBase(KotlinMavenExecutionProvider("compile", PomFile.DefaultPhases.Compile)) -class GenerateMavenTestCompileExecutionAction : PomFileActionBase(KotlinMavenExecutionProvider("test-compile", PomFile.DefaultPhases.TestCompile)) +class GenerateMavenCompileExecutionAction : PomFileActionBase(KotlinMavenExecutionProvider(PomFile.KotlinGoals.Compile, PomFile.DefaultPhases.Compile)) +class GenerateMavenTestCompileExecutionAction : PomFileActionBase(KotlinMavenExecutionProvider(PomFile.KotlinGoals.TestCompile, PomFile.DefaultPhases.TestCompile)) class GenerateMavenPluginAction : PomFileActionBase(KotlinMavenPluginProvider()) private val DefaultKotlinVersion = "\${kotlin.version}" @@ -62,18 +62,10 @@ private class KotlinMavenPluginProvider : AbstractDomGenerateProvider) { @@ -115,12 +101,6 @@ abstract class KotlinMavenConfigurator protected constructor(private val stdlibA protected abstract fun createExecutions(pomFile: PomFile, kotlinPlugin: MavenDomPlugin, module: Module) - protected abstract fun getGoal(isTest: Boolean): String - - protected open fun getExecutionId(isTest: Boolean): String { - return if (isTest) TEST_COMPILE_EXECUTION_ID else COMPILE_EXECUTION_ID - } - fun changePomFile( module: Module, file: PsiFile, @@ -163,10 +143,11 @@ abstract class KotlinMavenConfigurator protected constructor(private val stdlibA protected fun createExecution( pomFile: PomFile, kotlinPlugin: MavenDomPlugin, + executionId: String, + goalName: String, module: Module, isTest: Boolean) { - pomFile.addKotlinExecution(module, kotlinPlugin, getExecutionId(isTest), PomFile.getPhase(hasJavaFiles(module), isTest), isTest, - listOf(getGoal(isTest))) + pomFile.addKotlinExecution(module, kotlinPlugin, executionId, PomFile.getPhase(hasJavaFiles(module), isTest), isTest, listOf(goalName)) } companion object { @@ -179,9 +160,6 @@ abstract class KotlinMavenConfigurator protected constructor(private val stdlibA private val SONATYPE_OSS_REPOSITORY_NAME = "Sonatype OSS Snapshot Repository" private val SONATYPE_OSS_REPOSITORY_URL = "http://oss.sonatype.org/content/repositories/snapshots" - private val TEST_COMPILE_EXECUTION_ID = "test-compile" - private val COMPILE_EXECUTION_ID = "compile" - private fun hasJavaFiles(module: Module): Boolean { return !FileTypeIndex.getFiles(JavaFileType.INSTANCE, GlobalSearchScope.moduleScope(module)).isEmpty() } diff --git a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/KotlinMavenPluginPhaseInspection.kt b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/KotlinMavenPluginPhaseInspection.kt index ee7d2af3934..766167e4623 100644 --- a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/KotlinMavenPluginPhaseInspection.kt +++ b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/KotlinMavenPluginPhaseInspection.kt @@ -43,7 +43,7 @@ import org.jetbrains.kotlin.idea.maven.configuration.KotlinMavenConfigurator import java.util.* class KotlinMavenPluginPhaseInspection : DomElementsInspection(MavenDomProjectModel::class.java) { - override fun getStaticDescription() = "The inspecition's purpose is to check Maven pom and kotlin maven plugin configuration" + override fun getStaticDescription() = "Reports kotlin-maven-plugin configuration issues" override fun checkFileElement(domFileElement: DomFileElement?, holder: DomElementAnnotationHolder?) { if (domFileElement == null || holder == null) { @@ -149,7 +149,7 @@ class KotlinMavenPluginPhaseInspection : DomElementsInspection) : IntentionAction, LowPriorityAction { - override fun getText() = "Add dependency..." - override fun getFamilyName() = "Kotlin" + override fun getText() = "Add Maven dependency..." + override fun getFamilyName() = text override fun startInWriteAction() = false override fun isAvailable(project: Project, editor: Editor?, file: PsiFile?) = smartPsiElementPointer.element.let { it != null && it.isValid } && file != null && MavenDomUtil.findContainingProject(file) != null @@ -119,29 +119,3 @@ class AddMavenDependencyQuickFix(val className: String, val smartPsiElementPoint } } -object PlatformUnresolvedProvider : KotlinIntentionActionFactoryWithDelegate() { - override fun getElementOfInterest(diagnostic: Diagnostic) = QuickFixUtil.getParentElementOfType(diagnostic, KtNameReferenceExpression::class.java) - override fun extractFixData(element: KtNameReferenceExpression, diagnostic: Diagnostic) = element.getReferencedName() - - override fun createFixes(originalElementPointer: SmartPsiElementPointer, diagnostic: Diagnostic, quickFixDataFactory: () -> String?): List { - val result = ArrayList() - - originalElementPointer.element?.references?.filterIsInstance()?.firstOrNull()?.let { reference -> - UnresolvedReferenceQuickFixProvider.registerReferenceFixes(reference, object: QuickFixActionRegistrar { - override fun register(action: IntentionAction) { - result.add(QuickFixWithDelegateFactory(IntentionActionPriority.LOW) { action }) - } - - override fun register(fixRange: TextRange, action: IntentionAction, key: HighlightDisplayKey?) { - register(action) - } - - override fun unregister(condition: Condition) { - } - }) - } - - return result - } - -} diff --git a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/KotlinTestJUnitInspection.kt b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/KotlinTestJUnitInspection.kt index 800adfb3937..40031b989fb 100644 --- a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/KotlinTestJUnitInspection.kt +++ b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/KotlinTestJUnitInspection.kt @@ -58,7 +58,7 @@ class KotlinTestJUnitInspection : DomElementsInspection(Ma private class ReplaceToKotlinTest(val dependency: MavenDomDependency) : LocalQuickFix { override fun getName() = "Replace with kotlin-test-junit" - override fun getFamilyName() = "Kotlin" + override fun getFamilyName() = name override fun applyFix(project: Project, descriptor: ProblemDescriptor) { if (dependency.isValid) { 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/SameVersionIDEPluginInspection.kt index 479fd01879c..ca7db5501f3 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/SameVersionIDEPluginInspection.kt @@ -22,22 +22,19 @@ import com.intellij.util.xml.highlighting.DomElementAnnotationHolder import com.intellij.util.xml.highlighting.DomElementsInspection import org.jetbrains.idea.maven.dom.model.MavenDomPlugin import org.jetbrains.idea.maven.dom.model.MavenDomProjectModel +import org.jetbrains.kotlin.idea.maven.PomFile +import org.jetbrains.kotlin.idea.versions.bundledRuntimeVersion class SameVersionIDEPluginInspection : DomElementsInspection(MavenDomProjectModel::class.java) { - private val idePluginVersion by lazy { - SameVersionIDEPluginInspection::class.java.classLoader?.getResourceAsStream("META-INF/build.txt")?.bufferedReader()?.use { it.readText() } - } + private val idePluginVersion by lazy { bundledRuntimeVersion() } override fun checkFileElement(domFileElement: DomFileElement?, holder: DomElementAnnotationHolder?) { if (domFileElement == null || holder == null) { return } - domFileElement.rootElement.build.plugins.plugins.filter { it.version.exists() && it.version.stringValue != idePluginVersion }.forEach { plugin -> - createProblem(holder, plugin) - } - - domFileElement.rootElement.build.pluginManagement.plugins.plugins.filter { it.version.exists() && it.version.stringValue != idePluginVersion }.forEach { plugin -> + val pomFile = PomFile(domFileElement.file) + pomFile.findKotlinPlugins().filter { it.version.exists() && it.version.stringValue != idePluginVersion }.forEach { plugin -> createProblem(holder, plugin) } } diff --git a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/SameVersionInspection.kt b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/SameVersionInspection.kt index 63d70f36453..2510cb2647e 100644 --- a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/SameVersionInspection.kt +++ b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/SameVersionInspection.kt @@ -16,12 +16,18 @@ package org.jetbrains.kotlin.idea.maven.inspections +import com.intellij.codeInspection.LocalQuickFix +import com.intellij.codeInspection.ProblemDescriptor import com.intellij.lang.annotation.HighlightSeverity +import com.intellij.openapi.project.Project import com.intellij.util.xml.DomFileElement +import com.intellij.util.xml.GenericDomValue import com.intellij.util.xml.highlighting.DomElementAnnotationHolder import com.intellij.util.xml.highlighting.DomElementsInspection +import org.jetbrains.idea.maven.dom.MavenVersionComparable import org.jetbrains.idea.maven.dom.model.MavenDomProjectModel import org.jetbrains.idea.maven.model.MavenId +import org.jetbrains.idea.maven.project.MavenProject import org.jetbrains.idea.maven.project.MavenProjectsManager import org.jetbrains.kotlin.idea.maven.PomFile import org.jetbrains.kotlin.idea.maven.configuration.KotlinJavaMavenConfigurator @@ -47,14 +53,49 @@ class SameVersionInspection : DomElementsInspection(MavenD val pomFile = PomFile(file) pomFile.findKotlinPlugins().filter { it.version.stringValue != stdlibVersion.singleOrNull() }.forEach { plugin -> - holder.createProblem(plugin.version, HighlightSeverity.WARNING, - "Plugin version (${plugin.version}) is not the same as library version (${stdlibVersion.joinToString(",", "", "")})") + val fixes = plugin.version.stringValue?.let { version -> + createFixes(project, plugin.version, stdlibVersion + version) + } ?: emptyList() + + holder.createProblem(plugin.version, + HighlightSeverity.WARNING, + "Plugin version (${plugin.version}) is not the same as library version (${stdlibVersion.joinToString(",", "", "")})", + *fixes.toTypedArray() + ) } pomFile.findDependencies(MavenId(KotlinMavenConfigurator.GROUP_ID, KotlinJavaMavenConfigurator.STD_LIB_ID, null)) .filter { it.version.stringValue != pluginVersion } .forEach { dependency -> - holder.createProblem(dependency.version, HighlightSeverity.WARNING, "Plugin version ($pluginVersion) is not the same as library version (${dependency.version})") + val fixes = dependency.version.stringValue?.let { version -> + createFixes(project, dependency.version, listOf(version, pluginVersion)) + } ?: emptyList() + + holder.createProblem(dependency.version, + HighlightSeverity.WARNING, + "Plugin version ($pluginVersion) is not the same as library version (${dependency.version})", + *fixes.toTypedArray()) } } + + private fun createFixes(project: MavenProject, versionElement: GenericDomValue<*>, versions: List): List { + val bestVersion = versions.maxBy { MavenVersionComparable(it) }!! + if (bestVersion == versionElement.stringValue) { + return emptyList() + } + + val properties = project.properties.entries.filter { it.value == bestVersion }.map { "\${${it.key}}" } + + return properties.map { SetVersionQuickFix(versionElement, it, bestVersion) } + + SetVersionQuickFix(versionElement, bestVersion, null) + } + + private class SetVersionQuickFix(val versionElement: GenericDomValue<*>, val newVersion: String, val versionResolved: String?) : LocalQuickFix { + override fun getName() = if (versionResolved == null) "Change version to $newVersion" else "Change version to $newVersion ($versionResolved)" + override fun getFamilyName() = "Change version" + + override fun applyFix(project: Project, descriptor: ProblemDescriptor) { + versionElement.value = newVersion + } + } } \ No newline at end of file diff --git a/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/MavenTestCase.java b/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/MavenTestCase.java index 470160e8741..49e650a66a8 100644 --- a/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/MavenTestCase.java +++ b/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/MavenTestCase.java @@ -54,7 +54,7 @@ import java.util.List; import java.util.concurrent.TimeUnit; public abstract class MavenTestCase extends UsefulTestCase { - protected static final MavenConsole NULL_MAVEN_CONSOLE = new NullMavenConsole(); + protected static final MavenConsole NULL_MAVEN_CONSOLE = NullMavenConsole.INSTANCE; // should not be static protected static MavenProgressIndicator EMPTY_MAVEN_PROCESS = new MavenProgressIndicator(new EmptyProgressIndicator()); diff --git a/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/NullMavenConsole.java b/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/NullMavenConsole.java deleted file mode 100644 index 70688d9325a..00000000000 --- a/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/NullMavenConsole.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2010-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.idea.maven; - -import com.intellij.execution.process.ProcessHandler; -import org.jetbrains.idea.maven.execution.MavenExecutionOptions; -import org.jetbrains.idea.maven.project.MavenConsole; - -public class NullMavenConsole extends MavenConsole { - public NullMavenConsole() { - super(MavenExecutionOptions.LoggingLevel.DISABLED, false); - } - - @Override - public boolean canPause() { - return false; - } - - @Override - public boolean isOutputPaused() { - return false; - } - - @Override - public void setOutputPaused(boolean outputPaused) { - } - - @Override - public void attachToProcess(ProcessHandler processHandler) { - } - - @Override - protected void doPrint(String text, MavenConsole.OutputType type) { - } -} diff --git a/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/NullMavenConsole.kt b/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/NullMavenConsole.kt new file mode 100644 index 00000000000..a428307b8a7 --- /dev/null +++ b/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/NullMavenConsole.kt @@ -0,0 +1,34 @@ +/* + * Copyright 2010-2015 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.kotlin.idea.maven + +import com.intellij.execution.process.ProcessHandler +import org.jetbrains.idea.maven.execution.MavenExecutionOptions +import org.jetbrains.idea.maven.project.MavenConsole + +object NullMavenConsole : MavenConsole(MavenExecutionOptions.LoggingLevel.DISABLED, false) { + override fun canPause() = false + override fun isOutputPaused() = false + override fun setOutputPaused(outputPaused: Boolean) { + } + + override fun attachToProcess(processHandler: ProcessHandler) { + } + + override fun doPrint(text: String, type: MavenConsole.OutputType) { + } +} diff --git a/idea/idea-maven/testData/maven-inspections/sameVersionPluginLibrary.fixed.1.xml b/idea/idea-maven/testData/maven-inspections/sameVersionPluginLibrary.fixed.1.xml new file mode 100644 index 00000000000..efcb01b4c2b --- /dev/null +++ b/idea/idea-maven/testData/maven-inspections/sameVersionPluginLibrary.fixed.1.xml @@ -0,0 +1,37 @@ + + + 4.0.0 + + org.jetbrains.kotlin.test + configure-maven-test + 1.0-SNAPSHOT + + + 1.0.1 + 1.0.1-2 + + + + + org.jetbrains.kotlin + kotlin-stdlib + ${kotlin.version.2} + + + + + + + org.jetbrains.kotlin + kotlin-maven-plugin + ${kotlin.version.2} + + + + + + + + \ No newline at end of file diff --git a/idea/idea-maven/testData/maven-inspections/sameVersionPluginLibrary.fixed.2.xml b/idea/idea-maven/testData/maven-inspections/sameVersionPluginLibrary.fixed.2.xml new file mode 100644 index 00000000000..0da5452e2d2 --- /dev/null +++ b/idea/idea-maven/testData/maven-inspections/sameVersionPluginLibrary.fixed.2.xml @@ -0,0 +1,37 @@ + + + 4.0.0 + + org.jetbrains.kotlin.test + configure-maven-test + 1.0-SNAPSHOT + + + 1.0.1 + 1.0.1-2 + + + + + org.jetbrains.kotlin + kotlin-stdlib + ${kotlin.version.2} + + + + + + + org.jetbrains.kotlin + kotlin-maven-plugin + 1.0.1-2 + + + + + + + + \ No newline at end of file diff --git a/idea/src/META-INF/maven.xml b/idea/src/META-INF/maven.xml index 0d572105af6..6f878a24c3a 100644 --- a/idea/src/META-INF/maven.xml +++ b/idea/src/META-INF/maven.xml @@ -5,7 +5,7 @@ - + @@ -17,16 +17,16 @@ - - - () { + override fun getElementOfInterest(diagnostic: Diagnostic) = QuickFixUtil.getParentElementOfType(diagnostic, KtNameReferenceExpression::class.java) + override fun extractFixData(element: KtNameReferenceExpression, diagnostic: Diagnostic) = element.getReferencedName() + + override fun createFixes(originalElementPointer: SmartPsiElementPointer, diagnostic: Diagnostic, quickFixDataFactory: () -> String?): List { + val result = ArrayList() + + originalElementPointer.element?.references?.filterIsInstance()?.firstOrNull()?.let { reference -> + UnresolvedReferenceQuickFixProvider.registerReferenceFixes(reference, object: QuickFixActionRegistrar { + override fun register(action: IntentionAction) { + result.add(QuickFixWithDelegateFactory(IntentionActionPriority.LOW) { action }) + } + + override fun register(fixRange: TextRange, action: IntentionAction, key: HighlightDisplayKey?) { + register(action) + } + + override fun unregister(condition: Condition) { + } + }) + } + + return result + } + +} \ No newline at end of file diff --git a/idea/src/org/jetbrains/kotlin/idea/quickfix/QuickFixRegistrar.kt b/idea/src/org/jetbrains/kotlin/idea/quickfix/QuickFixRegistrar.kt index 93f46ed4b42..da30b14e408 100644 --- a/idea/src/org/jetbrains/kotlin/idea/quickfix/QuickFixRegistrar.kt +++ b/idea/src/org/jetbrains/kotlin/idea/quickfix/QuickFixRegistrar.kt @@ -19,7 +19,7 @@ package org.jetbrains.kotlin.idea.quickfix import com.intellij.codeInsight.intention.IntentionAction import org.jetbrains.kotlin.diagnostics.DiagnosticFactory import org.jetbrains.kotlin.diagnostics.Errors.* -import org.jetbrains.kotlin.idea.maven.inspections.PlatformUnresolvedProvider +import org.jetbrains.kotlin.idea.inspections.PlatformUnresolvedProvider import org.jetbrains.kotlin.idea.core.overrideImplement.ImplementAsConstructorParameter import org.jetbrains.kotlin.idea.core.overrideImplement.ImplementMembersHandler import org.jetbrains.kotlin.idea.inspections.AddModifierFixFactory