【发布时间】:2015-11-30 12:42:18
【问题描述】:
我最近开始使用eclipse mars,发现了一个很烦人的问题。当我使用ctrl+shft+/ 注释多行代码块时,它会将块设置在 /* */ 之间,但一旦我保存它,它就会在块中所有行的前面放置一个 *。现在,当我尝试使用ctrl+shft+\ 取消注释它时,只删除了开始和结束/* 和*/,但没有将* 添加到所有行。我需要更改什么设置才能删除此自动格式设置?
例子:
保存前的注释格式
/*This is just an example
of multi-line block comment
in eclipse mars*/
保存后的评论格式
/*
* This is just an example
* of multi-line block comment
* in eclipse mars
*/
保存后取消注释格式,eclipse添加的*不删除
* This is just an example
* of multi-line block comment
* in eclipse mars
【问题讨论】:
-
你在 Preferences --> java --> Code Style --> Code Template --> patterns of Comments (File / Types/ Fields /Constructor...) 中更改过什么吗?跨度>
-
@ArdeshanaMilan,我什么都不记得了。
-
您能指定您从哪个更新站点下载的版本和环境吗?我在 mars.1 中尝试过,它可以正常工作。
-
@ArdeshanaMilan,我从 Eclipse Foundation 的 linux 网站下载了它。我暂时关闭了格式化。
-
如果你觉得它是eclipse平台的一个bug,那么请在eclipse下提交一个bug --> 产品:Java开发工具。有问题中提到的细节(如何重现)。这是链接bugs.eclipse.org/bugs/enter_bug.cgi?product=JDT。
标签: eclipse eclipse-jdt