Eclipse清理代码样式为整个包/类集 [英] Eclipse cleanup code-style for entire package/class set

查看:128
本文介绍了Eclipse清理代码样式为整个包/类集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



(首选项> Java>代码样式>清除方法)是否有任何方法可以在一整套类/包中运行Eclipse清理规则向上)



我右键单击该类并调用Source-Clean Up,但是一定会在一组类上调用它。

解决方案

如果您在编辑器或其他视图中右键单击,我不确定您的问题。但是,如果您在包资源管理器中选择多个多个源文件或文件夹,则可以在包资源管理器中右键单击源 - >清理。清理向导第一页中的标题应该指示要清理的文件数量(例如清理1个项目中的20个文件)


Is there any way to run the Eclipse cleanup rules on a whole set of classes/packages instead of individual classes?

(Preferences > Java > Code Style > Clean Up)

I right-click on the class and invoke Source-Clean Up, but it sure would be nice to invoke it on a set of classes.

解决方案

I'm not sure from your question if you're right clicking in the Editor or in one of the other views. However, if you select multiple multiple source files or folders in the Package Explorer you can right click in the Package Explorer and do Source -> Clean Up. The title in the first page of the Clean Up wizard should indicate how many files are going to be cleaned (e.g. "Cleaning up 20 files in 1 project")

这篇关于Eclipse清理代码样式为整个包/类集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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