2014-12-28 14 views
7

Beim Schreiben von Java-Code sortiert IntelliJ automatisch Importe nach Namen. Wenn Mitglieder in Kotlin importiert werden, bleiben sie jedoch unsortiert. Wählen Sie Code → Optimieren Sie die Importe (Ctrl + Alt + O) tut nichts. HierIntelliJ sortiert keine Kotlin-Importe

ein Beispiel:

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 

Was ich erwarte:

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 

Ich benutze IntelliJ 14.0.2 mit der Kotlin-Plugin (Version 0.10.195)

+13

Ihre Beobachtung ist korrekt. Diese Funktionalität wurde noch nicht implementiert: https://youtrack.jetbrains.com/issue/KT-4789 – yole

+1

Dieses Problem wurde gemäß YouTrack gelöst. –

+0

@JaysonMinard scheint, es ist immer noch nicht gelöst oder fehle ich etwas? – miensol

Antwort

2

Dies wurde behoben in recent versions of IntelliJ, zum Beispiel die current version (zum Zeitpunkt des Schreibens 2017.3.3)

Wenn Sie nur eine dauerhafte Fallback-Lizenz für die Vollversion von IntelliJ 14 haben, können Sie die Community Edition einer neueren Version verwenden.