Include jre -> jdk library replacement to cleanup

This commit is contained in:
Nikolay Krasko
2018-06-01 16:17:41 +03:00
parent c568ea043f
commit bc85b531ee
8 changed files with 12 additions and 2 deletions
@@ -16,6 +16,7 @@
package org.jetbrains.kotlin.idea.inspections.gradle
import com.intellij.codeInspection.CleanupLocalInspectionTool
import com.intellij.codeInspection.ProblemHighlightType
import com.intellij.openapi.roots.ModuleRootManager
import com.intellij.openapi.roots.ProjectRootManager
@@ -39,7 +40,7 @@ import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.path.GrC
private val LibInfo.gradleMarker get() = "$groupId:$name"
class DeprecatedGradleDependencyInspection : GradleBaseInspection() {
class DeprecatedGradleDependencyInspection : GradleBaseInspection(), CleanupLocalInspectionTool {
override fun buildVisitor(): BaseInspectionVisitor = DependencyFinder()
private open class DependencyFinder : KotlinGradleInspectionVisitor() {
@@ -16,6 +16,7 @@
package org.jetbrains.kotlin.idea.maven.inspections
import com.intellij.codeInspection.CleanupLocalInspectionTool
import com.intellij.codeInspection.ProblemHighlightType
import com.intellij.util.text.VersionComparatorUtil
import com.intellij.util.xml.DomFileElement
@@ -29,7 +30,9 @@ import org.jetbrains.kotlin.idea.maven.PomFile
import org.jetbrains.kotlin.idea.maven.findDependencies
import org.jetbrains.kotlin.idea.versions.DEPRECATED_LIBRARIES_INFORMATION
class DeprecatedMavenDependencyInspection : DomElementsInspection<MavenDomProjectModel>(MavenDomProjectModel::class.java) {
class DeprecatedMavenDependencyInspection :
DomElementsInspection<MavenDomProjectModel>(MavenDomProjectModel::class.java), CleanupLocalInspectionTool {
override fun checkFileElement(domFileElement: DomFileElement<MavenDomProjectModel>?, holder: DomElementAnnotationHolder?) {
if (domFileElement == null || holder == null) return
+1
View File
@@ -46,6 +46,7 @@
displayName="Deprecated library is used in Gradle"
groupName="Kotlin"
enabledByDefault="true"
cleanupTool="true"
language="Groovy"
hasStaticDescription="true"
level="WARNING"/>
+1
View File
@@ -45,6 +45,7 @@
displayName="Deprecated library is used in Gradle"
groupName="Kotlin"
enabledByDefault="true"
cleanupTool="true"
language="Groovy"
hasStaticDescription="true"
level="WARNING"/>
+1
View File
@@ -45,6 +45,7 @@
displayName="Deprecated library is used in Gradle"
groupName="Kotlin"
enabledByDefault="true"
cleanupTool="true"
language="Groovy"
hasStaticDescription="true"
level="WARNING"/>
+1
View File
@@ -54,6 +54,7 @@
displayName="Deprecated library is used in Gradle"
groupName="Kotlin"
enabledByDefault="true"
cleanupTool="true"
language="Groovy"
hasStaticDescription="true"
level="WARNING"/>
+1
View File
@@ -54,6 +54,7 @@
displayName="Deprecated library is used in Gradle"
groupName="Kotlin"
enabledByDefault="true"
cleanupTool="true"
language="Groovy"
hasStaticDescription="true"
level="WARNING"/>
+1
View File
@@ -83,6 +83,7 @@
displayName="Deprecated library is used in Maven"
groupName="Kotlin"
enabledByDefault="true"
cleanupTool="true"
language="XML"
hasStaticDescription="true"
level="WARNING" />