【问题标题】:Block comment issue with Eclipse MarsEclipse Mars 的块评论问题
【发布时间】: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


【解决方案1】:

最后,我使用了answer 中发布的信息,效果如愿。

【讨论】:

    猜你喜欢
    • 2015-09-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-11-26
    • 2011-01-16
    • 2011-07-28
    • 1970-01-01
    相关资源
    最近更新 更多