intellij-community
intellij-community copied to clipboard
Kotlin auto-completion: don't show aliased Java types
https://youtrack.jetbrains.com/issue/KTIJ-14200
Types like java.lang.StringBuilder
or java.lang.AssertionError
often pop up in Kotlin auto completion, causing unnecessary ugly imports. Here, I’ve tried to fix it by disabling type aliases on the first auto completion attempt.
It could use some improvements, though.
Putting the list of aliased types in the fqNameUtil.kt
looks inelegant. Ideally it would’ve been better to delegate it to the compiler library, but I haven’t found anything like that there.
On the second attempt those types still pop up in pretty much random order. It would’ve been better to give them a lower priority.
But it works, and to me it’s already a great help, not having to figure out which type is Kotlin and which is Java every time I see an auto-completion list pop up.
Could you pls create a KTIJ ticket to describe problem.
Done: https://youtrack.jetbrains.com/issue/KTIJ-22052/Auto-completion-shows-aliased-Java-types