Intellij Idea 15 - disable import statement re-arrangement

Answered

Hi, I'm using INtellij Idea 15 for my Java project. I notice that the IDe automatically updated my import statement arrangement. It did that in order specified in Settings > Editor > Code Style > Imports > Import Layout. I deleted all statements from there but now it re-arranges the imports in alphabetical order.

I do not want it to make any kind of arrangements on my import statements. How can I prevent Idea from ignoring my import statements for re-arrangements?

Thanks

2
7 comments

Disable this option:

3
Avatar
Permanently deleted user

@Serge Baranov that helps but it's not an actual solution. Occasionally I have unused imports and I manually invoke "Optimize imports" to remove them, but that also reorders them. It would be nice to be able to disable the reordering. 

3

I'm willing to go to the extra work despite the tracked issue. This works for me.

Thanks, Serge!

0

It's very embarrassing and annoying to the rest of the team who use Eclipse to constantly changing dozens of import statements for just single or couple of line real code changes!

This way I almost need to give up on using IntelliJ.... It's great if SW is smart and intelligent, but everything has its limits, and the auto reordering is beyond the limits

0

This worked for me Thanks

0

I had problems turning that off too. There is this plugin "Save Actions". If you search for it in settings you find the configs for that. There you have the checkbox "Optimize Imports". Worked for me.

1

Please sign in to leave a comment.