Eclipse代码折叠插件 [英] Code folding plugin for Eclipse?
问题描述
我不喜欢Eclipse的代码折叠功能,因为关闭文件时不会保存折叠状态,就像Visual Studio使用其 #region
指令一样。
尝试使用: http://code.google.com/p/coffee-bytes/
您必须下载源代码,导入项目进入Eclipse并构建它。之后导出代码作为Eclipse的可部署插件。您将有一个安装包。
- 将其安装到Eclipse中。
- 转到Eclipse首选项...
- 输入搜索折叠
- 选择Jave->编辑 - >折叠
- 在ComboBox中选择
咖啡字节Java折叠 - 在常规选项卡设置复选框 - 用户
定义的区域 - 在用户定义的区域选项卡中,输入#region作为
开始标记,#endregion作为结束标记
在设置特殊注释后,代码折叠将可用:
/ / #region
...一些代码...
// #endregion
I dislike Eclipse's code folding feature, because the folding state isn't saved when you close the file, like Visual Studio does with its #region
directives.
Does anyone know of a plugin which saves the status of the code folding per file, so that when I open it, the code stays folded?
Try to use: http://code.google.com/p/coffee-bytes/
You have to download the source code, import project into Eclipse and build it. After that Export code as a deployable plug-in for Eclipse. You will have a package for installation.
- Install it into Eclipse.
- Go To Eclipse Preferences...
- Type in search "Folding"
- Select Jave->Editor->Folding
- Select in ComboBox "Coffee Bytes Java Folding"
- On General Tab set checkbox - "User Defined Regions"
- In User Defined Regions tab - enter #region as a start tag and #endregion as an end tag
In code folding will be available after setting special comments into it:
// #region
... some code ...
// #endregion
这篇关于Eclipse代码折叠插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!