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?
Asked
Active
Viewed 2.2k times
30
-
[Coffee-Bytes for Eclipse 3.6 & higher][1]. [1]: http://stackoverflow.com/questions/8534542/what-code-folding-plugins-work-on-eclipse-3-6 – Yaqub Ahmad Jan 03 '12 at 07:45
-
So... I see the link you posted -- and it has a great description and all -- but how the heck do you download it?! – BrainSlugs83 Oct 05 '14 at 00:42
-
For reference, the download location is buried in the answers comments somewhere: http://kosiara87.blogspot.in/2011/12/how-to-install-coffee-bytes-plugin-in.html -- Also, this appears to work in Luna, but you have to restart once after installing, and once again after configuring. – BrainSlugs83 Oct 05 '14 at 00:56
-
I created an update site for the old coffee bytes code folding plugin that works with Eclipse Neon: https://github.com/stefaneidelloth/EclipseFolding/raw/master/com.cb.platsupp.site – Stefan Feb 12 '17 at 13:39
1 Answers
50
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.
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.
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).

anon
- 4,578
- 3
- 35
- 54

Vineet Reynolds
- 76,006
- 17
- 150
- 174
-
I've never seen CoffeeBytes Code Folder before. Could you perhaps include how to acquire/install it? – Patrick Perini Aug 04 '11 at 19:43
-
1@Patrick, there's a [SO question](http://stackoverflow.com/questions/206158/is-there-any-way-to-manually-fold-code-in-eclipse) that answers your question. Also, check the [Apache Isis site](http://incubator.apache.org/isis/ide-support.html). – Vineet Reynolds Aug 04 '11 at 19:49
-
Coffee-Bytes does not work in Eclipse 3.6: http://stackoverflow.com/questions/8534542/any-good-code-folding-plugin-for-eclipse-3-6-the-coffee-bytes-code-folding-does – Yaqub Ahmad Dec 16 '11 at 13:34
-
Read the comment 3 above you - Apache Isis has a Coffee-Bytes that works for 3.6. – J. Stoever Dec 21 '11 at 13:08
-
4+1, this work and working Coffee-byte for Eclipse Indigo is here http://kosiara87.blogspot.in/2011/12/how-to-install-coffee-bytes-plugin-in.html – Gaurav Agarwal Jun 09 '12 at 15:17
-
I would love to be able to just highlight an arbitrary block of text and say "fold this" without having to edit the code. The folding doesn't need to persist between loads or anything. I *still* haven't found a way to do this in Eclipse, although Vim has had it for years... – Ti Strga Jan 17 '13 at 17:06
-
Hmmm... didn't work right away in Eclipse Luna -- after configuring the options I had to close and re-open it. – BrainSlugs83 Oct 05 '14 at 00:55
-
-
Ehhh.. Cannot get user-defined regions to fold in MyEclipse v.10. The minus sign does not pop up after I add the comment lines with start and end identifiers.. – Kirill Yunussov Aug 13 '15 at 20:16