Completion: corrected presentation for extension properties
This commit is contained in:
@@ -76,12 +76,6 @@ public object KotlinLookupElementFactory {
|
||||
val returnType = descriptor.getReturnType()
|
||||
element = element.withTypeText(if (returnType != null) DescriptorRenderer.SHORT_NAMES_IN_TYPES.renderType(returnType) else "")
|
||||
element = element.appendTailText(DescriptorRenderer.SHORT_NAMES_IN_TYPES.renderFunctionParameters(descriptor), false)
|
||||
|
||||
if (descriptor.getExtensionReceiverParameter() != null) {
|
||||
val tail = " for " + DescriptorRenderer.SHORT_NAMES_IN_TYPES.renderType(descriptor.getExtensionReceiverParameter()!!.getType()) +
|
||||
" in " + DescriptorUtils.getFqName(descriptor.getContainingDeclaration())
|
||||
element = element.appendTailText(tail, true)
|
||||
}
|
||||
}
|
||||
|
||||
is VariableDescriptor -> {
|
||||
@@ -97,6 +91,15 @@ public object KotlinLookupElementFactory {
|
||||
}
|
||||
}
|
||||
|
||||
if (descriptor is CallableDescriptor) {
|
||||
val receiver = descriptor.getExtensionReceiverParameter()
|
||||
if (receiver != null) {
|
||||
val tail = " for " + DescriptorRenderer.SHORT_NAMES_IN_TYPES.renderType(receiver.getType()) +
|
||||
" in " + DescriptorUtils.getFqName(descriptor.getContainingDeclaration())
|
||||
element = element.appendTailText(tail, true)
|
||||
}
|
||||
}
|
||||
|
||||
if (KotlinBuiltIns.getInstance().isDeprecated(descriptor)) {
|
||||
element = element.withStrikeoutness(true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user