5

visual studio has an excellent feature for manual code folding by using regions. i am new to eclipse and android but cant find figure out how to do this in eclipse. i am missing this feature in eclipse desperately

has anyone achieved this in eclipse

thanks in advance

Raj
  • 6,810
  • 6
  • 48
  • 56
  • [Coffee-Bytes for Eclipse 3.6 & higher][1]. [1]: http://stackoverflow.com/questions/8534542/what-code-folding-plugins-work-on-eclipse-3-6 – Yaqub Ahmad Jan 03 '12 at 07:47

2 Answers2

8

I use eclipse Coffee-Bytes plugin over a year. This eclipse folding plugin can be configured so that it was identical to visual studio folding. Lock this and this. Hope it's help you.

Pasha
  • 2,407
  • 18
  • 25
  • thnx mate... gona download coffee-bytes and start using it – Raj Mar 01 '11 at 12:20
  • Hi, yes it's on 3.6. Why without success? Can you explain more about problem? – Pasha Mar 04 '11 at 08:13
  • 1
    Note that as of Aug 2011, the plugin is now hosted here: http://code.google.com/p/coffee-bytes/ (although it is not maintained) – Peter Mularien Aug 26 '11 at 20:48
  • Coffee-Bytes does not work in Eclipse 3.6: http://stackoverflow.com/questions/8534542/any-good-code-folding-plugin-for-eclipse-3-6-the-coffee-bytes-code-folding-does – Yaqub Ahmad Dec 16 '11 at 13:36
  • Doesnt work properly in eclipse 4.2 either. I keep seeing a new exception in my error log every time i click in the editor window. – pdeva Jul 29 '12 at 02:08
4

Manual code folding can be added by writing your own small Eclipse plug-in. What it take is implementing two classes and packing them into an Eclipse plug-in that registers onto the org.eclipse.jdt.ui.foldingStructureProvider extension-point.

This is probably not the awnser you were hoping from, but as far as I know the only way to add custom code folding to the Eclipse Java editor. From your question I see that you are mostly a visual-studio user and as such not familiar with Eclipse plug-in architecture, but depending on your experience with general plug-in architectures, extending Eclipse is (in small scale) pretty straight forward.

BernardMarx
  • 916
  • 8
  • 17