Eclipse按字母顺序组织方法 [英] Eclipse organize methods in alphabetical order

查看:567
本文介绍了Eclipse按字母顺序组织方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个大类,包含大约30个方法。是否可以在eclipse中按字母顺序自动排序?我希望这样做,这样他们将更容易找到当java浏览或查看类大纲窗口。

解决方案

如果你只想按照排序顺序查看你的类成员,而不修改代码,然后你可以点击大纲视图上的A / Z图标,正如其他人所指出的。或者,您可能希望在代码本身中对类成员进行排序,在这种情况下,您应右键单击源或源文件名以获取上下文相关菜单,然后选择源(Alt-Shift-S),排序成员。 / p>

它会弹出一个对话框,允许您自定义排序,选择所需的选项,然后单击确定。


I have a large class that contains about 30 methods. Is it possible to automatically sort them in alphabetical order in eclipse? I was hoping to do this so they would be easier to find when java browsing or looking at the class outline window.

解决方案

If you just want to view your class members in sorted order without modifying the code then you can click on the A/Z icon on the outline view, as others have pointed out. Alternatively, you may wish to sort the class members in the code itself, in which case you should right click your source or source file name to get the context sensitive menu, then select Source(Alt-Shift-S), Sort Members.

It will pop up a dialog box allowing you to customize the sort, choose your desired options and click ok.

这篇关于Eclipse按字母顺序组织方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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