Bug 38357 Reorder suggestion for moving class to new package [quick fix]
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.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ReorgCorrectionsSubProcessor.java
/*******************************************************************************
 * Copyright (c) 2000, 2003 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Common Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.internal.ui.text.correction;
import java.util.Collection;