Project: JDT
Bug 7653 Outline doesn't sort overloaded methods
Reported: 2002-01-15 17:28:29 | Status: verified fixed

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)

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsViewer.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementSorter.java