简体   繁体   中英

How to alphabetize all members in Eclipse Outline view?

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:

在此处输入图像描述

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM