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/typehierarchy/MethodsViewer.java
public MethodsViewerSorter() {
		}
			
		public int compare(Viewer viewer, Object e1, Object e2) {
			int cat1 = category(e1);
			int cat2 = category(e2);
			if (cat1 != cat2)
				return cat1 - cat2;
			
			String name1= JavaElementLabels.getElementLabel((IJavaElement) e1, JavaElementLabels.ALL_DEFAULT);
			String name2= JavaElementLabels.getElementLabel((IJavaElement) e2, JavaElementLabels.ALL_DEFAULT);
			return getCollator().compare(name1, name2);
		}
	}
	
	
	private static final String TAG_HIDEFIELDS= "hidefields"; 
	private static final String TAG_HIDESTATIC= "hidestatic"; 
	private static final String TAG_HIDENONPUBLIC= "hidenonpublic"; 
	private static final String TAG_SHOWINHERITED= "showinherited";		 
	private static final String TAG_VERTICAL_SCROLL= "mv_vertical_scroll";		 
	
	private MethodsViewerFilterAction[] fFilterActions;
	private MethodsViewerFilter fFilter;
		
	private OpenJavaElementAction fOpen;
	private ShowInheritedMembersAction fShowInheritedMembersAction;
	private ContextMenuGroup[] fStandardGroups;