如何使Eclipse Formatter不会破坏注释掉的代码? [英] How to make Eclipse Formatter to not destroy commented out code?

查看:125
本文介绍了如何使Eclipse Formatter不会破坏注释掉的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很多同事喜欢离开后面的代码,如何使Eclipse Formatter不会破坏该代码的格式(现在它使一个大的blob或块)。



PS我知道我可以以某种方式配置格式化程序来忽略该代码,我做了一次,但我不能记住如何。

解决方案

在Eclipse格式化程序设置(首选项/ Java /代码样式/格式化程序)的选项卡中注释UNCHECK复选框启用块注释格式化和启用行注释格式化这些应该禁用。


A lot of my co-workers enjoy leaving behind commented out code, how to make Eclipse Formatter to not destroy formatting of that code(now it makes a big blob or block of it).

P.S. I know I can somehow configure the formatter to just ignore that code, I done it once, but I cant remember how.

解决方案

In the Eclipse Formatter Settings (Preferences/Java/Code Style/Formatter) in the tab Comments UNCHECK the checkbox "Enable Block Comment Formatting" and "Enable Line Comment Formatting" These should be disabled anyway.

这篇关于如何使Eclipse Formatter不会破坏注释掉的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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