When writing Java code, IntelliJ automatically sorts the import by name. However, when members are imported into Kotlin, they remain unsorted. Code Selection → Optimize Import ( Ctrl + Alt + O ) does nothing.
Here is an example:
import kotlin.platform.platformStatic import java.text.DateFormaty import org.hibernate.validator.constraints.NotEmpty as notEmpty import com.fasterxml.jackson.annotation.JsonProperty as jsonProperty import javax.validation.constraints.NotNull as notNull import javax.validation.Valid as valid
What I expect:
import com.fasterxml.jackson.annotation.JsonProperty as jsonProperty import org.hibernate.validator.constraints.NotEmpty as notEmpty import kotlin.platform.platformStatic import java.text.DateFormat import javax.validation.constraints.NotNull as notNull import javax.validation.Valid as valid
I am using IntelliJ 14.0.2 with the Kotlin plugin (version 0.10.195)
intellij-idea intellij-14 kotlin
mattbdean
source share