在intelliJ IDEA中自动对导入进行分组

yas*_*ith 7 java code-formatting intellij-idea

我想在 intelliJ 中按包对导入进行分组。

现在它对导入进行了正确的排序,并给了我这个。

import com.google.common.Something
import com.google.common.SomethingElse
import org.apache.commons.Something
import org.apache.commons.SomethingElse
Run Code Online (Sandbox Code Playgroud)

我希望它是

import com.google.common.Something
import com.google.common.SomethingElse

import org.apache.commons.Something
import org.apache.commons.SomethingElse
Run Code Online (Sandbox Code Playgroud)

我怎样才能让 intelliJ 自动执行此操作,而不必在Editor->Cody Style->Java->Imports->Import Layout.