Minor: add getName() for three local quick fixes to fix 162 / AS23
This commit is contained in:
@@ -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
|
||||
|
||||
+3
-1
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user