KT-24146: Fix inserts imports automatically
Even if "add unambiguous imports on the fly" is off #KT-24146 fixed
This commit is contained in:
@@ -47,6 +47,8 @@ class KotlinReferenceImporter : ReferenceImporter {
|
||||
|
||||
val nameExpression = file.findElementAt(offset)?.parent as? KtSimpleNameExpression ?: return false
|
||||
|
||||
if (!CodeInsightSettings.getInstance().ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY) return false
|
||||
|
||||
val importFix: ImportFixBase<out KtExpression>? = findImportFixAt(editor, file, offset)
|
||||
if (importFix != null && !importFix.isOutdated()) {
|
||||
val addImportAction = importFix.createAction(file.project, editor, nameExpression)
|
||||
|
||||
Reference in New Issue
Block a user