Bug 7653 Outline doesn't sort overloaded methods
When you set the Outline view to sort by name (the A-Z button) it does not consider the methods' arguments when sorting them. #1 - create the following class in Eclipse: public class OutlineTest { public void foo(int x) {} public void foo(float x) {} public void foo(long x) {} public void foo(double x) {} public void bar() {} } #2 - open an Outline view on the class #3 - by default (unsorted) it shows foo(int x) foo(float x) foo(long x) foo(double x) bar() #3 - if you choose the 'A-Z' button, the outline re-sorts to bar() foo(int x) foo(float x) foo(long x) foo(double x) I had expected it to consider the arguments for overloaded functions and to sort like: bar() foo(double x) foo(float x) foo(int x) foo(long x) (I just noticed that the Packages view seems to use the same ordering as the Outline, so this bug is not restricted to the Outline.) (I'm pretty sure that VisualAge for Java takes the arguments into account when sorting overloaded functions.) (Tested against 20011219 build)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementSorter.java
private static final int PACKAGE_DECL=	1;
	private static final int IMPORT_CONTAINER=	2;
	private static final int TYPES= 3;
	private static final int CONSTRUCTORS=	4;
	private static final int STATIC_INIT= 5;
	private static final int STATIC_METHODS= 6;
	private static final int INIT= 7;
	private static final int METHODS= 8;
	private static final int STATIC_FIELDS= 9;
	private static final int FIELDS= 10;
	private static final int JAVAELEMENTS= 11;
	private static final int PACKAGEFRAGMENTROOTS= 12;
	private static final int PACKAGEFRAGMENT= 13;
	private static final int JAVAPROJECTS= 14;
	private static final int RESOURCEPACKAGES= 15;
	private static final int RESOURCEFOLDERS= 16;
	private static final int RESOURCES= 17;
	private static final int STORAGE= 18;
	
	private static final int OTHERS= 20;	
	private IClasspathEntry[] fClassPath;
	/*
	 * @see ViewerSorter#sort
	 */
	public void sort(Viewer v, Object[] property) {
		fClassPath= null;
		try {
			super.sort(v, property);
		} finally {
			fClassPath= null;