开发者

Is there an Eclipse shortcut to sort members by modifier?

I开发者_运维问答'm looking for a shortcut, preference or plugin in Eclipse which will sort Java members by visibility modifier. Specifically, I'm looking for the class to be sorted like this:

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'm not fussed about alphabetically, only the visibility modifier.


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


(Alt-Shift-S), Sort Members. A pop Up opens and you can select whatever you want.

I have no reputation that's why I answered


This is probably related:

How to specify the order of class members when formatting in Eclipse

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜