is there any way to rearrange imports in java source file
java
Solution
In Eclipse, in the Package Explorer, right-click on the top-level package of the project. Choose Source > Organize Imports, and you're done, for all the files in your project.
Problem
Is there an easy way to rearrange imports in all *.java files in a project? so for example: ``` import java.util.Calendar; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; ``` would become ``` import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; ``` we have about 200 source files and they need to have imports in a order. What would be the best way to approach this? I am open to a perl/python/groovy script that would do this...