I heavily use the Eclipse organize imports function but a major annoyance for me is its tendency to add some incredibly niche type from a dependency with the same name as a class from the JRE.
For example, when I declare Map map;
and run "organize imports", Eclipse may add import net.some.dependency.of.my.dependency.i.never.use.Map
instead of import java.util.Map
and then valuable time is lost as I figure out why map.entrySet()
does not work anymore.
Is there some way of imposing a priority system on imports? For example:
- JRE classes
- My own classes
- my dependencies
- dependencies of my dependencies (and so on for 5.,6., ...)
I use Eclipse Neon 4.6.0M7.
P.S.: My dependencies are managed with Maven 3.3.9, in case that makes a difference.