Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent eclipse from putting static imports on top

Tags:

eclipse

Is there anyway I can stop eclipse from moving static imports to the top? We have code that doesn't have static imports on top and every time i hit organize imports it causes a long diff in the code.

like image 547
Gaurav Avatar asked Feb 01 '26 00:02

Gaurav


1 Answers

You can define the preferred sort order in the "Organize Imports" preferences. This tab also allows you to specify where you want specific static imports.

If you want Eclipse to not change the order of imports at all, then you must never use "Organize Imports." Use "Remove Unused Imports" instead.

like image 151
Aaron Digulla Avatar answered Feb 02 '26 15:02

Aaron Digulla



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!