Implementing folding for specific code blocks in java editor
Description
Code folding is a nice thing to collapse lots of code, unfortunately code folding is not possible in Java editor for condition blocks (if, else if, else), loops (do, for, while), switch/case blocks or try/catch blocks but it should as in other languages too.
Use case/motivation
Having the possibility to collapse/expand condition blocks, loop blocks and try/catch.
Related issues
No response
Are you willing to submit a pull request?
Yes
Code of Conduct
Yes
@Chris2011 there's no need to create an issue if you're already working on a pull request - it says this on the form, and just adds extra work.
@neilcsmith-net Ahh ok, thx for the hint :). Maybe I overread it.
useful feature
Thx, PR is still created, need to change some things first as requested :)
Any chance you could also include folding for /* */ style comments? It'd be really useful for hiding verbose explanations of what part of the code does or why
@OnyxianSoul So normal block comments, not documentation comments, right? If yes, I will try.
It would be great if it could recognize continuous "//" multi line comments but why not be able to do it on "/**/" commented parts also. It would be useful if there was a way to fold/hide unfold/show all of them all at once.
Any chance you could also include folding for /* */ style comments? It'd be really useful for hiding verbose explanations of what part of the code does or why
I had a look and it is already working. Go into a method, add /* Foo */ somwhere in the code and you can fold it. If you encounter a position, where this is not working, please create a new ticket with explicit steps to reproduce. @OnyxianSoul
Coming in NB 19