Is there an Eclipse shortcut for sorting members with a modifier?

I am looking for a shortcut, preference or plugin in Eclipse that will sort Java elements using a visibility modifier. In particular, I am looking for a class to sort as follows:

public someClass {
   //public variables go first followed by 
   //protected and default variables and lastly
   //private variables

   //public methods above
   //proteted and default methods with
   //private methods at the bottom
}

I did not fuss in alphabetical order, only a visibility modifier.

+5
source share
3 answers

Window-> preferences-> Java-> Appearance-> Members Sort

+6
source

(Alt-Shift-S),Sort members. A popup window opens and you can select whatever you want.

I have no reputation why I answered

+3
source

, , :

Eclipse

+2

All Articles