如何在Eclipse IDE中的方法块内折叠注释块的代码

问题描述 投票:0回答:1

如何折叠(概述)方法块内的注释块,就像方法和区域等一样?

sample_method_or_Class()
{
 /* I'd like to fold this
  * comment block
  */
}
/* The same way I can fold this one
 * outside the code block.
 */

Eclipse支持像Visual Studio这样的功能(How do I fold code for comment blocks inside method blocks?)吗?

eclipse formatting ide comments folding
1个回答
0
投票

遗憾的是,Eclipse中没有这样的支持。虽然有a request for this,2008年报道只有10票,所以我不希望它很快就会实施。

可以找到一个名为Coffee Bytes的Eclipse折叠插件,但大多数链接都被破坏了。看起来不支持最新的Eclipse版本,项目看起来已停止。

更新:

正如howlger在下面的评论中指出的那样,EclipseFolding插件很活跃。我现在测试了它,通过Help / Install new software... / Add...使用其更新站点安装它:

Eclipse重新启动后,我得到了一些小红色方块,表明这两个评论场景的折叠能力来自问题:

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.