Eclipse 中的代码折叠和换行符
像许多人一样,我喜欢在成员函数之间放置换行符,如下所示:
void foo() {
// ...
}
void bar() {
// ...
}
问题是,通过代码折叠,它看起来像这样:
void foo()
void bar()
那里有一个额外的换行符。我只能看到原本可以看到的功能的一半。有没有一种方法(或插件)可以使 Eclipse 将一个空的新行与函数的其余部分折叠起来?
Like many people, I like to put newlines between my member functions, like so:
void foo() {
// ...
}
void bar() {
// ...
}
The problem is, with code folding, it looks like this:
void foo()
void bar()
There is an extra newline in there. I can only see half the functions I could otherwise see. Is there a way (or a plugin) that makes Eclipse fold one empty new line with the rest of the function?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,在“窗口”->“首选项”->“Java”->“编辑器”->“折叠”中,除了提供的复选框之外,无法指定自定义折叠。我不确定任何类型的插件,所以也许其他人知道这些,但该功能似乎没有内置到 Eclipse 中
From what I can tell in Window->Preferences->Java->Editor->Folding there is no way to specify custom folding beyond the checkboxes provided there. I am unsure about any sort of plugin though so maybe someone else knows about those, but that functionality does not appear to be built into eclipse