开发者

Eclipse feature to arrange a class file?

Eclipse has tons of features, i'm wondering if this one exsists? Or if any shortcut ways of doing it exist?

I want to arrange my class data into Variables, Constructors, Methods in that flow(Top to Bottom)

Further refined I would li开发者_如何学Pythonke to arrange by access level(pub, private, protected) and type - void or methods that return. The same for Vars - access level and type.

Any ideas. I mean I try to keep my code as tidy as possible. But would be nice to kind of format a class that perhaps I havent written that is messy.


If you go the preferences screen and then go to Java -> Appearance -> Members Sort Order you can configure the sort order for members.

Next just right click when you have a file open and go to Source -> Sort members


Under Preferences choose Java -> Appearance -> Members Sort Order. This allows you to set the order of members within a class when you use the Sort Members action.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜