Question

I am new to java development environment and I find it difficult to manage my code properly. .Net provides the #regions which is a good solution for code management.

I am using Eclipse environment for java development. I tried the Coffee-Bytes but the Coffee-Bytes code folding is not working in Eclipse 3.6, at least on my side. I have configured it following this, but it does not work. Can someone guess what can be the issue? is there some other code folding plugin for Eclipse?

Was it helpful?

Solution

For what it's worth, check my answer to this post to make it work in 3.7 (Indigo)

getting an overview perspective of all methods in a class in Eclipse

[Copy-paste with some edits:]

The Coffee Bytes plugin is mentioned is no longer available at the referred locations. But, it seems that Bartosz Kosarzycki has posted an updated version yesterday [=Sunday, December 4, 2011]:

http://kosiara87.blogspot.com/2011/12/how-to-install-coffee-bytes-plugin-in.html

OTHER TIPS

I found out that this Coffee bytes works in Helios. After I try to install it in my helios and disable and enable the folding. It works like a charm.

Just ask me of the details if you can't make it work.

UPDATED For Helios

Again like the other answer suggested follow this link and the steps provided

http://kosiara87.blogspot.com/2011/12/how-to-install-coffee-bytes-plugin-in.html

then in your java editor, right click on the left edge where the options that include Folding will appear, and select disable folding.Right after, select enable folding. Thats it! I am using Helios and coffee bytes is working!

Send me your feedback if still not working.

I am not sure what #region is, but if you are looking for something that will allow you to see blocks of code and you would like to see where a particular block starts and ends easily, I would recommend the editbox plugin. You can use along with the eclipse code folding to get the best out of eclipse. The Edit box plugin is here:

http://editbox.sourceforge.net/

For making good use of the edit box, download a theme from here:

http://sourceforge.net/projects/editbox/forums/forum/1036090

Eclipse brings some out-of-the-box code folding features. You can check them at Window -> Preferences -> Java -> Editor -> Folding (Reference here). When you have the "Enable folding", you'll see a minus sign a the right border of the editor panel at the begining of every foldable block of code. Clicking on that sign will allow you to fold or expand this block of code..

Aditionally, you can, at Window -> Preferences -> Java -> Editor enable the "Only show the selected Java element" option. This way, you'll see at the editor frame only the element (as in method or class) you have selected at the navigation panel. Reference here.

Code folding from Apache Isis works fine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top