我在Windows Vista上运行indigo发行版 我已经设置了一般的打印边距 - >编辑 - >文本编辑器和Java中的最大行宽 - >代码风格 - >格式化为100个字符,但仍然决定将我的评论包装在第80列。
例如,当在我的文件顶部输入时:
(最长的行分别为90和94个字符)
// This comment is over 80 characters long, but it is in no way over 100 characters long.
/*
* The same problem occurs in block comments as well. True, neither problem is code breaking,
* but it certainly is annoying all the same.
*/
格式化为:
(分别为73和79个字符)
// This comment is over 80 characters long, but it is in no way over 100
// characters long.
/*
* The same problem occurs in block comments as well. True, neither problem is
* code breaking,
* but it certainly is annoying all the same.
*/
我已经尝试重启Java并点击了我能找到的每个“应用”按钮,但无济于事。它似乎并未在发行说明中列为已知问题。有什么我想念的吗?或许简单吗?
答案 0 :(得分:2)
至少在Eclipse Helios(3.6)上,在Formatter-settings上有一个单独的" Comments" -tab,它有自己的"评论的最大线宽"定形的。