Fixed JetTypeLookupExpression
This commit is contained in:
@@ -33,7 +33,7 @@ import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil
|
||||
public abstract class JetTypeLookupExpression<T : Any>(
|
||||
lookupItems: List<T>,
|
||||
protected val defaultItem: T,
|
||||
private val advertisementText: String
|
||||
private val advertisementText: String?
|
||||
) : Expression() {
|
||||
|
||||
protected abstract fun getLookupString(element: T): String
|
||||
|
||||
@@ -84,7 +84,7 @@ public class SpecifyTypeExplicitlyIntention : JetSelfTargetingIntention<JetCalla
|
||||
val types = if (isAnonymous) ArrayList<JetType>() else arrayListOf(exprType)
|
||||
types.addAll(allSupertypes)
|
||||
|
||||
return object : JetTypeLookupExpression<JetType>(types, types.first(), JetBundle.message("specify.type.explicitly.add.action.name")) {
|
||||
return object : JetTypeLookupExpression<JetType>(types, types.first(), null) {
|
||||
override fun getLookupString(element: JetType) = IdeDescriptorRenderers.SOURCE_CODE_SHORT_NAMES_IN_TYPES.renderType(element)
|
||||
override fun getResult(element: JetType) = IdeDescriptorRenderers.SOURCE_CODE.renderType(element)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user