Eclipse中的代码折叠 [英] Code folding in Eclipse

查看:800
本文介绍了Eclipse中的代码折叠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  //< editor-fold defaultstate =collapsed desc =description> 
....
//< / editor-fold>

和Visual Studio:

  #region description 
...
#endregion

但是我在eclipse中找不到相同的用法。如何在Eclispe中使用代码折叠?

解决方案

Eclipse支持代码折叠。



转到工作台首选项 - >常规 - >编辑器 - >结构化文本编辑器,然后选中启用折叠框。



然后转到工作台首选项 - > Java - >编辑器 - >折叠,并调整折叠偏好。


I used this way to get code folding in Netbeans:

// <editor-fold defaultstate="collapsed" desc=" description">
....
// </editor-fold>

and Visual Studio:

#region description
...
#endregion

but I can't find the same usage in eclipse. How can i use code folding in Eclispe?

解决方案

Eclipse supports code folding.

Go to workbench preferences -> General -> Editors -> Structured Text Editors, and check the "Enable folding" box.

Then go to workbench preferences -> Java -> Editor -> Folding, and adjust your folding preferences.

这篇关于Eclipse中的代码折叠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆