Project: JDT
Bug 38357 Reorder suggestion for moving class to new package [quick fix]
Reported: 2003-06-03 07:01:43 | Status: verified fixed

When the directory structure and package name of a class doesn't match, a suggestion offers two choices: o Move to new director corresponding to package name o Add/change package declaration to match directory structure However, when a class with no package is moved into a directory, the suggestions are prompted as: o Move to (default package) o Add package statement new.directory I'd suggest that (at least in the case of default packages) the 'add package statement' should come before the 'move to new directory'. Further, I think it has advantages for situations where bulk renaming of packages occur (e.g. the name of the project has changed) and it is easier to rename the directory and then perform the first suggestion, which in this case is unlikely to be moving it back to the original package. I'd like to see these two suggestions reversed in order, so that the package statement reflects the directory first, and then the suggestion to move the class to a new package second.

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ReorgCorrectionsSubProcessor.java