Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom Java Code Folding for Eclipse Helios

I spent a lot of time googling, now I'll try it here. Some of you might know the "regions" available in Microsoft Visual Studio, which allow you to collaps an arbitrary part of your code to just a single line, more or less like

// [start] The text which will appear instead of the collapsed part
...
A bunch of lines of code
...
// [end]

In my opinion this is a really fine way to comment code, but it doesn't seem to be available for Java and Eclipse. However, there was a plugin for that ( click ) but it doesn't work with Eclipse Helios.

So here's my question: Do you know a way to achieve this kind of code folding in a current version of eclipse?

like image 694
aRestless Avatar asked Jul 13 '11 17:07

aRestless


People also ask

How do you collapse a block of code in Eclipse?

To enable code folding, go to the Folding Preferences page, accessible from Window | Preferences | PHP | Editor | Using Code Folding . If Code Folding is enabled, minus signs will appear in the Annotation Bar next to code blocks which can be folded.

How do I collapse all methods in eclipse?

If you are using PyDev in Eclipse, its Ctrl 0 and Ctrl 9 for collapse all and uncollapse all respectively. Ctrl - and Ctrl = to collapse individual methods when your cursor is on the line of the method declaration.

When enabled for a specific section What do the preferences in Java editor folding control?

Code Folding enables you to 'collapse', or hide, certain sections of code while you are not working on them. This enables you to manage larger amounts of code within one window.


1 Answers

You can try this one - http://incubator.apache.org/isis/ide-support.html It claims to be working on Eclipse 3.5, so there is a chance it will work on 3.6/3.7 (you will have to try). Hope that helps!

like image 171
sgibly Avatar answered Oct 25 '22 10:10

sgibly