KT-5146 "Remove explicit type arguments" should highlight type arguments as unused (not as warning)

#KT-5146 fixed
This commit is contained in:
Evgeny Gerashchenko
2015-02-17 23:39:36 +03:00
parent b1840ebd99
commit a8179a497e
2 changed files with 9 additions and 2 deletions
@@ -60,10 +60,13 @@ public abstract class IntentionBasedInspection<T: JetElement>(
}
}
holder.registerProblem(targetElement, intention.getText(), ProblemHighlightType.GENERIC_ERROR_OR_WARNING, fix)
holder.registerProblem(targetElement, intention.getText(), problemHighlightType, fix)
}
}
}
protected open val problemHighlightType: ProblemHighlightType
get() = ProblemHighlightType.GENERIC_ERROR_OR_WARNING
}
private fun PsiElement.getOrCreateEditor(): Editor? {
@@ -18,5 +18,9 @@ package org.jetbrains.kotlin.idea.inspections
import org.jetbrains.kotlin.idea.intentions.RemoveExplicitTypeArguments
import org.jetbrains.kotlin.psi.JetTypeArgumentList
import com.intellij.codeInspection.ProblemHighlightType
public class RemoveExplicitTypeArgsInspection : IntentionBasedInspection<JetTypeArgumentList>(RemoveExplicitTypeArguments())
public class RemoveExplicitTypeArgsInspection : IntentionBasedInspection<JetTypeArgumentList>(RemoveExplicitTypeArguments()) {
override val problemHighlightType: ProblemHighlightType
get() = ProblemHighlightType.LIKE_UNUSED_SYMBOL
}