KotlinInspectionSuppressor: introduce more precise quick-fix names
Related to KT-11154, KT-25169
This commit is contained in:
+2
@@ -22,6 +22,8 @@ class KotlinInspectionSuppressor : InspectionSuppressor {
|
|||||||
object : SuppressQuickFix {
|
object : SuppressQuickFix {
|
||||||
override fun getFamilyName() = it.familyName
|
override fun getFamilyName() = it.familyName
|
||||||
|
|
||||||
|
override fun getName() = it.text
|
||||||
|
|
||||||
override fun applyFix(project: Project, descriptor: ProblemDescriptor) = it.invoke(project, null, descriptor.psiElement)
|
override fun applyFix(project: Project, descriptor: ProblemDescriptor) = it.invoke(project, null, descriptor.psiElement)
|
||||||
|
|
||||||
override fun isAvailable(project: Project, context: PsiElement) = it.isAvailable(project, null, context)
|
override fun isAvailable(project: Project, context: PsiElement) = it.isAvailable(project, null, context)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// "Suppress Warnings" "true"
|
// "Suppress 'SpellCheckingInspection' for val str" "true"
|
||||||
// TOOL: com.intellij.spellchecker.inspections.SpellCheckingInspection
|
// TOOL: com.intellij.spellchecker.inspections.SpellCheckingInspection
|
||||||
// ACTION: Add 'const' modifier
|
// ACTION: Add 'const' modifier
|
||||||
// ACTION: Typo: Change to...
|
// ACTION: Typo: Change to...
|
||||||
@@ -12,5 +12,6 @@
|
|||||||
// ACTION: Convert property initializer to getter
|
// ACTION: Convert property initializer to getter
|
||||||
// ACTION: Inject language or reference
|
// ACTION: Inject language or reference
|
||||||
// ACTION: To raw string literal
|
// ACTION: To raw string literal
|
||||||
|
// ACTION: Suppress 'SpellCheckingInspection' for file suppressAvailable.kt
|
||||||
|
|
||||||
val str = "<caret>kjsghkjshtiurhuig"
|
val str = "<caret>kjsghkjshtiurhuig"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// "Suppress Warnings" "true"
|
// "Suppress 'SpellCheckingInspection' for val str" "true"
|
||||||
// TOOL: com.intellij.spellchecker.inspections.SpellCheckingInspection
|
// TOOL: com.intellij.spellchecker.inspections.SpellCheckingInspection
|
||||||
// ACTION: Add 'const' modifier
|
// ACTION: Add 'const' modifier
|
||||||
// ACTION: Typo: Change to...
|
// ACTION: Typo: Change to...
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
// ACTION: Convert property initializer to getter
|
// ACTION: Convert property initializer to getter
|
||||||
// ACTION: Inject language or reference
|
// ACTION: Inject language or reference
|
||||||
// ACTION: To raw string literal
|
// ACTION: To raw string literal
|
||||||
|
// ACTION: Suppress 'SpellCheckingInspection' for file suppressAvailable.kt
|
||||||
|
|
||||||
@Suppress("SpellCheckingInspection")
|
@Suppress("SpellCheckingInspection")
|
||||||
val str = "kjsghkjshtiurhuig"
|
val str = "kjsghkjshtiurhuig"
|
||||||
Reference in New Issue
Block a user