Reputation: 4464
I have an import ordering setup in IntelliJ:
But when I do Ctrl + alt + O
to optimize my imports, it shoves the google imports on top followed by the company imports and does not insert a blank line either. Anything I'm missing here?
Upvotes: 2
Views: 2108
Reputation: 1915
Notice how the import packages are displayed:
import com.company.*.*
and import com.google.*.*
vs
import java.*
and import javax.*
When you specify the package name do not add .*
at the end (i.e you have written com.company.*
, but you should write com.company
instead).
Upvotes: 2
Reputation:
There is a bug listed in IntelliJ's IDEA's bug tracker IDEA-142468 which I believe describes this issue. It appears to particularly not work well when attempting to list static imports first. Unfortunately, I don't see much of a resolution or workaround within that ticket.
While these aren't completely satisfying, here's what I suggest:
Upvotes: 1