KT-9815 Import insertion (on Alt-Enter) does not work in Evaluate Expression

#KT-9815 Fixed
This commit is contained in:
Valentin Kipyatkov
2015-10-29 15:08:48 +03:00
parent 61fc3e7705
commit 752cdd5f83
2 changed files with 7 additions and 3 deletions
@@ -103,6 +103,10 @@ public abstract class KtCodeFragment(
override fun addImportsFromString(imports: String?) {
if (imports == null || imports.isEmpty()) return
myImports.addAll(imports.split(IMPORT_SEPARATOR))
// we need this code to force re-highlighting, otherwise it does not work by some reason
val tempElement = KtPsiFactory(project).createColon()
add(tempElement).delete()
}
public fun importsAsImportList(): KtImportList? {