Eclipse功能安排一个类文件? [英] Eclipse feature to arrange a class file?

查看:190
本文介绍了Eclipse功能安排一个类文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Eclipse有很多功能,我想知道这个是否存在?或者,如果有任何捷径的方式存在吗?

我希望安排我的班级数据到该流程中的变量,构造函数,方法(从上到下)



进一步细化我想按访问级别(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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆