Eclipse功能安排一个类文件? [英] Eclipse feature to arrange a class file?
问题描述
我希望安排我的班级数据到该流程中的变量,构造函数,方法(从上到下)
进一步细化我想按访问级别(pub,private,protected)和类型 - void或返回的方法来安排。同样的Vars - 访问级别和类型。
任何想法。我的意思是我尽量保持我的代码尽可能的整洁。但是,对于那种可能我没有写过的类来说,格式化会很好。
解决方案然后转到Java - > Appearance - > Members Sort Order,你可以为成员配置排序顺序。
源 - >排序成员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 like 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
这篇关于Eclipse功能安排一个类文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!