How to fold for, while and if blocks in Java Eclipse

6.8k views Asked by At

I'm using Eclipse Luna for Java. By default, Eclipse only lets me fold Comments, Header Comments, Inner Types, Members and Imports.

Is there a plugin that allows me to fold for, while and if blocks?

I searched the marketplace and various sources and found nothing for this.

Edit: Before downvoting, consider I have thoroughly researched this before posting. Other similar questions on the site don't solve this problem or are completely outdated and resources no longer available. Also, I'm not looking for a #beginregion #endregion workaround (the code is already written and that's not really a good solution).

1

There are 1 answers

7
Blake Yarbrough On

Try using the Coffee Bytes plugin.

the archive and installation instructions can be found at this blogspot.

Alternately, IntelliJ supports folding all blocks surrounded by brackets e.g.{}.