Fixed JetTypeLookupExpression

This commit is contained in:
Valentin Kipyatkov
2015-05-05 18:32:49 +03:00
parent 74cdd39ac9
commit 392a1f52eb
2 changed files with 2 additions and 2 deletions
@@ -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)
}