From f11a05e5045a5e4bfb6b83d7da372878ec1b5642 Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Thu, 17 Apr 2014 13:46:28 +0400 Subject: [PATCH] Smart completion: auto popup parameter info for constructor --- .../jet/plugin/completion/smart/TypeInstantiationItems.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/idea/src/org/jetbrains/jet/plugin/completion/smart/TypeInstantiationItems.kt b/idea/src/org/jetbrains/jet/plugin/completion/smart/TypeInstantiationItems.kt index f06d7ef8a2e..756edcb9845 100644 --- a/idea/src/org/jetbrains/jet/plugin/completion/smart/TypeInstantiationItems.kt +++ b/idea/src/org/jetbrains/jet/plugin/completion/smart/TypeInstantiationItems.kt @@ -19,6 +19,7 @@ import com.intellij.codeInsight.lookup.LookupElementPresentation import com.intellij.codeInsight.completion.InsertionContext import org.jetbrains.jet.lang.resolve.BindingContext import org.jetbrains.jet.plugin.project.ResolveSessionForBodies +import com.intellij.codeInsight.AutoPopupController class TypeInstantiationItems(val bindingContext: BindingContext, val resolveSession: ResolveSessionForBodies) { public fun addToCollection(collection: MutableCollection, expectedInfos: Collection) { @@ -81,9 +82,9 @@ class TypeInstantiationItems(val bindingContext: BindingContext, val resolveSess val endOffset = startOffset + text.length editor.getCaretModel().moveToOffset(if (caretPosition == CaretPosition.IN_BRACKETS) endOffset - 1 else endOffset) - //TODO: auto-popup parameter info and other functionality from JetFunctionInsertHandler - shortenReferences(context, startOffset, endOffset) + + AutoPopupController.getInstance(context.getProject())?.autoPopupParameterInfo(editor, null) } }