How to alphabetize all members in Eclipse Outline view?

58 Views Asked by At

In the Eclipse Outline view, there is a button to sort members alphabetically. However, it seems to sort members by category first, and then by alphabet, such that the resulting list is not in fact alphabetical. I don't see it, but is is there a way to ignore categories and sort everything in the list together alphabetically?

Example class:

package com.foo;

public class Foo {
    private static int zurklfutz;
    public int hoopliket;

    protected void terfwad() {
    }

    public void badelfrok() {
    }

    public Foo() {
    }

    private void adelbrecht() {
    }

    public static void zebulon() {
    }

    static int nerdiftun;
}

Results categorized, and then alphabetized within categories resulting in not-very-alphabetic list:

enter image description here

1

There are 1 best solutions below

2
greg-449 On

Looking at the source code org.eclipse.jdt.ui.JavaElementComparator this is not possible.

The sort always sorts first by categories using the order defined in "Preferences > Java > Appearance > Members Sort Order".

The pop-up "Quick Outline" (Navigate > Quick Outline, Ctrl+O, ⌘+O on macs) does have an alphabetic sort option in the menu at the top right.