From e9e028f987016bf9c4cd440ba246eed2d69e93c6 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Fri, 16 Jun 2017 16:20:55 +0300 Subject: [PATCH] Minor: add getName() for three local quick fixes to fix 162 / AS23 --- .../jetbrains/kotlin/idea/inspections/EmptyRangeInspection.kt | 4 +++- .../inspections/RemoveRedundantSpreadOperatorInspection.kt | 4 +++- .../kotlin/idea/inspections/WrapUnaryOperatorInspection.kt | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/inspections/EmptyRangeInspection.kt b/idea/src/org/jetbrains/kotlin/idea/inspections/EmptyRangeInspection.kt index 074430840de..e7178dd8ffb 100644 --- a/idea/src/org/jetbrains/kotlin/idea/inspections/EmptyRangeInspection.kt +++ b/idea/src/org/jetbrains/kotlin/idea/inspections/EmptyRangeInspection.kt @@ -47,7 +47,9 @@ class EmptyRangeInspection : AbstractPrimitiveRangeToInspection() { } class ReplaceWithDownToFix : LocalQuickFix { - override fun getFamilyName() = "Replace with 'downTo'" + override fun getName() = "Replace with 'downTo'" + + override fun getFamilyName() = name override fun applyFix(project: Project, descriptor: ProblemDescriptor) { val element = descriptor.psiElement as? KtExpression ?: return diff --git a/idea/src/org/jetbrains/kotlin/idea/inspections/RemoveRedundantSpreadOperatorInspection.kt b/idea/src/org/jetbrains/kotlin/idea/inspections/RemoveRedundantSpreadOperatorInspection.kt index 306308c47d5..4a338f093fe 100644 --- a/idea/src/org/jetbrains/kotlin/idea/inspections/RemoveRedundantSpreadOperatorInspection.kt +++ b/idea/src/org/jetbrains/kotlin/idea/inspections/RemoveRedundantSpreadOperatorInspection.kt @@ -56,7 +56,9 @@ class RemoveRedundantSpreadOperatorInspection : AbstractKotlinInspection() { } class RemoveRedundantSpreadOperatorQuickfix : LocalQuickFix { - override fun getFamilyName() = "Remove redundant spread operator" + override fun getName() = "Remove redundant spread operator" + + override fun getFamilyName() = name override fun applyFix(project: Project, descriptor: ProblemDescriptor) { val arrayOfValueArgument = descriptor.psiElement as? KtValueArgument ?: return diff --git a/idea/src/org/jetbrains/kotlin/idea/inspections/WrapUnaryOperatorInspection.kt b/idea/src/org/jetbrains/kotlin/idea/inspections/WrapUnaryOperatorInspection.kt index bfb31679a06..b4339ef1fc4 100644 --- a/idea/src/org/jetbrains/kotlin/idea/inspections/WrapUnaryOperatorInspection.kt +++ b/idea/src/org/jetbrains/kotlin/idea/inspections/WrapUnaryOperatorInspection.kt @@ -57,7 +57,9 @@ class WrapUnaryOperatorInspection : AbstractKotlinInspection() { } private class WrapUnaryOperatorQuickfix : LocalQuickFix { - override fun getFamilyName() = "Wrap unary operator and value with ()" + override fun getName() = "Wrap unary operator and value with ()" + + override fun getFamilyName() = name override fun applyFix(project: Project, descriptor: ProblemDescriptor) { val expression = descriptor.psiElement as? KtPrefixExpression ?: return