0

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).

user1766833
  • 45
  • 1
  • 7
  • 1
    Check this answer [Is there a way to fold eclipse sub-blocks like an "if" statement?](http://stackoverflow.com/questions/2369057/is-there-a-way-to-fold-eclipse-sub-blocks-like-an-if-statement) – Jordi Castilla Jun 15 '15 at 15:08
  • 1
    I have. That question is from 2010 and all the resources are unavailable. I have looked at all related questions in the site before posting. (Also, I don't know if you were the one to downvote me, but if you did it's really unfair.) – user1766833 Jun 15 '15 at 15:14
  • so you must add this info in your question!!! – Jordi Castilla Jun 15 '15 at 15:14
  • 1
    I thought it was expected to have researched the question before posting. I quote "I searched the marketplace and various sources and found nothing for this". And you sent me to a 5 year old post with broken links and downvote me for having done my research properly? – user1766833 Jun 15 '15 at 15:24
  • **first** I didn't downvote I flagged question to be closed **second** I don't know if you make any research, I'm not a sorcerer **third** http://stackoverflow.com/help/how-to-ask **fourth** in this way you won't get much help in SO – Jordi Castilla Jun 15 '15 at 15:29
  • I don't mean to be rude. It's just I asked a pertinent question and I keep getting downvoted. It's very frustrating. Can you deflag me? – user1766833 Jun 15 '15 at 15:34
  • sure, but when you update your question with the info of your research... please take a look to link of how to ask, just in first point says: ***Search**, and research ...and keep track of what you find. Even if you don't find a useful answer elsewhere on the site, including links to related questions that haven't helped* – Jordi Castilla Jun 15 '15 at 15:37
  • if you searched... why you dont finished [here](http://stackoverflow.com/questions/6940199/how-to-use-coffee-bytes-code-folding/6947590#6947590) or [here](http://stackoverflow.com/questions/8534542/what-code-folding-plugins-work-on-eclipse-3-6/8706723#8706723) or [here](http://themindstorms.blogspot.com.es/2006/11/my-eclipse-code-folding-plugin.html)???? all the links appear in the question i linked.... – Jordi Castilla Jun 15 '15 at 15:51
  • I've seen all of those links and none of them have folding for if, for or while blocks. Only user defined regions. And yes, I should've linked the similar questions that didn't help. – user1766833 Jun 15 '15 at 16:10
  • It appears to me that the question linked by @JordiCastilla has an answer. It's just not the answer that you hoped for (no, sorry, no support and no plug-in). – Erick G. Hagstrom Jun 15 '15 at 19:11

1 Answers1

2

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.{}.

Blake Yarbrough
  • 2,286
  • 1
  • 20
  • 36
  • be careful... this blogspot is same url of question I linked!!! he was quite angry with that ;) – Jordi Castilla Jun 15 '15 at 15:52
  • I've checked your link and noticed that the blogspot link in that question was in an answer other than the accepted one. Perhaps this made it difficult to locate? The same link is definitely there though and I have confirmed **it is not broken**. @user1766833 if Jordi answers the question with the link, I recommend you accept his answer. That is if the coffee bytes plugin actually solves the issue – Blake Yarbrough Jun 15 '15 at 15:58
  • 1
    don't worry, I won't post any answer... but is nice OP realizes the lack of research that denotes the question in order to ask better ones in the future.... – Jordi Castilla Jun 15 '15 at 16:00
  • Thanks LanguidSquid, but that plugin is only for regions (#beginregion #endregion) and not for for, while, if, else blocks. Thanks anyway! :) – user1766833 Jun 15 '15 at 16:01
  • If you are willing to switch, I know that **IntelliJ IDEA** supports code folding – Blake Yarbrough Jun 15 '15 at 16:02
  • please dont cross read.... http://stackoverflow.com/a/6947590/3850595 – Jordi Castilla Jun 15 '15 at 16:03
  • Also, if Jordi answers the question with an answer that solves my problem, I will gladly accept. (What's cross read?) – user1766833 Jun 15 '15 at 16:07