diff --git a/idea/src/org/jetbrains/kotlin/idea/j2k/J2kPostProcessings.kt b/idea/src/org/jetbrains/kotlin/idea/j2k/J2kPostProcessings.kt index 582cbcdecf7..c524a063ef5 100644 --- a/idea/src/org/jetbrains/kotlin/idea/j2k/J2kPostProcessings.kt +++ b/idea/src/org/jetbrains/kotlin/idea/j2k/J2kPostProcessings.kt @@ -54,8 +54,8 @@ object J2KPostProcessingRegistrar { _processings.add(ConvertToStringTemplateProcessing()) _processings.add(UsePropertyAccessSyntaxProcessing()) _processings.add(RemoveRedundantSamAdaptersProcessing()) - _processings.add(AccessorBodyToExpression()) + registerIntentionBasedProcessing(ConvertToExpressionBodyIntention()) { it is KtPropertyAccessor } registerIntentionBasedProcessing(IfThenToSafeAccessIntention()) registerIntentionBasedProcessing(IfThenToElvisIntention()) registerIntentionBasedProcessing(IfNullToElvisIntention()) @@ -210,14 +210,4 @@ object J2KPostProcessingRegistrar { } } } - - private class AccessorBodyToExpression : J2kPostProcessing { - private val intention = ConvertToExpressionBodyIntention() - - override fun createAction(element: KtElement, diagnostics: Diagnostics): (() -> Unit)? { - if (element !is KtPropertyAccessor) return null - if (!intention.isApplicableTo(element)) return null - return { intention.applyTo(element, true) } - } - } } \ No newline at end of file