7
編寫Java代碼時,IntelliJ會自動按名稱排序導入。但是,當Kotlin的成員入口時,他們仍然未排序。選擇代碼→優化進口(Ctrl + Alt + O)什麼都不做。IntelliJ不排序Kotlin導入
下面是一個例子:
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
我很期待:
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
我使用的IntelliJ 14.0.2與科特林插件(0.10.195版本)
你的觀察是正確的。此功能尚未實施:https://youtrack.jetbrains.com/issue/KT-4789 – yole
根據YouTrack已解決此問題。 –
@JaysonMinard似乎還沒有解決或我錯過了什麼? – miensol