eclipse 如何使用 Coffee-Bytes 代码折叠

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6940199/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 16:45:59  来源:igfitidea点击:

How to use Coffee-Bytes code folding

eclipsefolding

提问by Bangkok Apartment

How to use "Coffee-Bytes code folding"? I want to use user defined region but don't know how to use it. Can anyone guide me? And how to use it in java code?

如何使用“咖啡字节代码折叠”?我想使用用户定义的区域,但不知道如何使用它。任何人都可以指导我吗?以及如何在java代码中使用它?

回答by Vineet Reynolds

Firstly, you'll need to configure Coffee Bytes Java folding as the folding scheme to use, and then enable User Defined Regions, as shown below.

首先,您需要将 Coffee Bytes Java 折叠配置为要使用的折叠方案,然后启用用户定义区域,如下所示。

Enable Coffee Bytes Java folding

启用 Coffee Bytes Java 折叠

Secondly, you'll need to configure the start and end identifiers that will be used to identify the beginning and termination of regions in your code. In this case, I've chosen {{and }}as it fits well with the Apache Isis templates that I use.

其次,您需要配置开始和结束标识符,用于标识代码中区域的开始和结束。在这种情况下,我选择了它{{}}因为它非常适合我使用的 Apache Isis 模板。

Configure the start and end regions

配置开始和结束区域

Finally, I use the same start and end identifiers in my code to demarcate regions and to trigger the Coffee Bytes folding plugin to recognize the same. After saving the preferences, your user-defined regions should immediately take effect (although you may need to close and re-open any open code files).

最后,我在我的代码中使用相同的开始和结束标识符来划分区域并触发 Coffee Bytes 折叠插件来识别相同的内容。保存首选项后,您的用户定义区域应立即生效(尽管您可能需要关闭并重新打开任何打开的代码文件)。

Use start and end regions in code

在代码中使用开始和结束区域