I recently started using IntelliJ and have really been enjoying it but something that has driven me crazy is that for some reason imports all are inline! For example in the blow code:
// No imports yet
public class Hello {
public void main() {
ArrayList<String> newList = new ArrayList<>();
}
}
Here because ArrayList isn't imported it is highlighted red, yet when I go click alt-enter on it, what happens is:
// No imports yet
public class Hello {
public void main() {
java.util.ArrayList<String> newList = new ArrayList<>();
}
}
So it only inlines the import and only does so to one of them. How do I change the behavior so that IntelliJ imports the line at the top instead?
Help much appreciated!
This behavior is controlled by the Use fully qualified class names setting in the Java Code Style, Imports tab.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With