diff --git a/idea/src/org/jetbrains/kotlin/idea/completion/handlers/KotlinCallableInsertHandler.kt b/idea/src/org/jetbrains/kotlin/idea/completion/handlers/KotlinCallableInsertHandler.kt index da028ae9347..c86ef9779dc 100644 --- a/idea/src/org/jetbrains/kotlin/idea/completion/handlers/KotlinCallableInsertHandler.kt +++ b/idea/src/org/jetbrains/kotlin/idea/completion/handlers/KotlinCallableInsertHandler.kt @@ -77,7 +77,7 @@ public abstract class KotlinCallableInsertHandler : BaseDeclarationInsertHandler if (DescriptorUtils.isTopLevelDeclaration(descriptor)) { ApplicationManager.getApplication()?.runWriteAction { - ImportInsertHelper.getInstance(context.getProject()).addImportDirectiveIfNeeded(DescriptorUtils.getFqNameSafe(descriptor), file) + ImportInsertHelper.getInstance(context.getProject()).importDescriptor(file, descriptor) } } }