Bug 14411 Method sorting should put methods with less parameters first
Build 20020418 If you define the following cu: public class X { public void foo(String) { } public void foo(String, String) { } } and you choose to sort in the Outline, you get the following order: X +- foo(String, String) +- foo(String) I would expect to have: X +- foo(String) +- foo(String, String)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementSorter.java
import org.eclipse.jdt.core.IInitializer;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels;
/**
 * Sorter for Java elements. Ordered by element category, then by element name. 
 * Package fragment roots are sorted as ordered on the classpath.
 * @since 2.0
 */
public class JavaElementSorter extends ViewerSorter {
	
	private static final int JAVAPROJECTS= 1;
	private static final int PACKAGEFRAGMENTROOTS= 2;
	private static final int PACKAGEFRAGMENT= 3;
	private static final int RESOURCEPACKAGES= 6;
	private static final int COMPILATIONUNITS= 4;
	private static final int CLASSFILES= 5;
	
	private static final int RESOURCEFOLDERS= 7;
	private static final int RESOURCES= 8;
	private static final int STORAGE= 9;	
	
	private static final int PACKAGE_DECL=	10;
	private static final int IMPORT_CONTAINER= 11;
	private static final int IMPORT_DECLARATION= 12;