Refactor DescriptorRenderer's renderAccessors option
In some tests with txt (probably all except loadJava), property accessors are not rendered at all, so a third option value (NONE) will be useful to determine whether we need to render annotations on property accessors as get/set/sparam-targeted annotations on the property
This commit is contained in:
+3
-2
@@ -10,6 +10,7 @@ import org.jetbrains.kotlin.idea.util.IdeDescriptorRenderers
|
||||
import org.jetbrains.kotlin.load.java.JvmAbi
|
||||
import org.jetbrains.kotlin.psi.KtDeclaration
|
||||
import org.jetbrains.kotlin.renderer.ParameterNameRenderingPolicy
|
||||
import org.jetbrains.kotlin.renderer.PropertyAccessorRenderingPolicy
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.isExtension
|
||||
import javax.swing.Icon
|
||||
|
||||
@@ -45,7 +46,7 @@ class KotlinMethodSmartStepTarget(
|
||||
private val renderer = IdeDescriptorRenderers.SOURCE_CODE_SHORT_NAMES_NO_ANNOTATIONS.withOptions {
|
||||
parameterNameRenderingPolicy = ParameterNameRenderingPolicy.NONE
|
||||
withoutReturnType = true
|
||||
renderAccessors = true
|
||||
propertyAccessorRenderingPolicy = PropertyAccessorRenderingPolicy.PRETTY
|
||||
startFromName = true
|
||||
modifiers = emptySet()
|
||||
}
|
||||
@@ -75,4 +76,4 @@ class KotlinMethodSmartStepTarget(
|
||||
}
|
||||
return declaration!!.hashCode()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user