Smart completion: auto popup parameter info for constructor

This commit is contained in:
Valentin Kipyatkov
2014-04-17 13:46:28 +04:00
parent df299655a7
commit f11a05e504
@@ -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<LookupElement>, expectedInfos: Collection<ExpectedInfo>) {
@@ -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)
}
}