Search This Blog

Loading...

Sunday, December 4, 2011

how to install coffee-bytes plugin in eclipse; Eclipse folding plugin; manual folding plugin

I had trouble finding a good folding plugin for eclipse Indigo. The installation details are inserted below. In short: download the archive, extract plugins and features folders to the appropriate plugins and features folders in eclipse.

USAGE:

in User Defined Regions tab use e.g.:

Start identifier: region    End identifier: endregion

In code:

//region SomeName
your code
//endregion SomeName

 

Installation instructions:

  1. Install plugin
    1. Unpack the downloaded file eclipse-folding-plugin.tar.gz
    2. Copy the contents of the:
      1. features folder => eclipse features folder
      2. plugins folder => eclipse plugins folder
  2. Configure plugin in Eclipse:
    1. Select "Windows->Preferences"
    2. Select "Java->Editor->Folding"
    3. Check the "Enable folding" option
    4. Select "Coffee Bytes Java Folding" in the "Select folding to use:" option
    5. Check "User Defined Regions" in the "General Fold Setting:" option

72 comments:

  1. Thanks for publishing a working plugin for Indigo!

    ReplyDelete
  2. Source is available here:
    http://code.google.com/p/coffee-bytes/source/browse/

    but the project is now dead (last commit was 2006).
    I used the plugin for java, so it worked for me....

    ReplyDelete
  3. Thank you very much...
    ^_^
    It satisfied me...

    ReplyDelete
  4. thank you very much! it's helpful!

    ReplyDelete
  5. Do you think this editor ( the user defined region folding) could be tailored or shoe-horned to work with CDT C++ editor ??!!

    ReplyDelete
  6. Thanks! Been looking for something like this for java for ages. This is confirmed working on Ubuntu 11.04 w/ Eclipse 3.7 Indigo

    ReplyDelete
  7. I dont find step 4: option "select folding to use".
    anybody can help me?
    when clicking "Folding" all the options are checkboxes: Enable folding, comments, header comments, inner types, members, imports. dont have the option above.

    thanks

    ReplyDelete
    Replies
    1. I just ran into this issue. If you are running under Windows 7, right click on the Eclipse icon and run it as an admin. Then follow the instructions. You can run it normally afterward.

      Delete
    2. thanks, but what is the password of admin? how can i know?

      Delete
    3. Well buddy, if you don't know your own admin password, how could you expect that we do...

      Delete
    4. I think the admin password is usually the name of your first Pet..!

      Delete
    5. Also, if you are running Win7 64-bit, you may need to make sure that eclipse is running from the Program Files (x86) folder, to ensure that it is treated as a 32-bit application.

      Delete
  8. very nice... thank you very much........

    ReplyDelete
  9. nice feature, thanks

    ReplyDelete
  10. Thanks a lot for this plugin! Works fine in INDIGO.

    ReplyDelete
  11. This comment has been removed by the author.

    ReplyDelete
  12. Ok, we are getting this error in Eclipse Juno for Java http://stackoverflow.com/questions/11260868/eclipse-juno-assertion-failed-problems-occurred-when-invoking-code-from-plug

    ReplyDelete
  13. Any solution ? the assertion failed is really annoying bug :(

    ReplyDelete
  14. Same error: assertion failed

    Thanks

    ReplyDelete
  15. Google for file "com.cb.eclipse.folding_1.0.7.jar", this seems to be updated version of "com.cb.eclipse.folding_1.0.6.jar" plugin file or something.... I've installed it about hour ago, so far no problems encountered

    ReplyDelete
  16. nevermind, it does appear also with this one :/

    ReplyDelete
  17. Yes, unfortunately it appears but a lot rare than 1.0.6.

    I hope it will be fixed.

    ReplyDelete
  18. Thanks so much!! I am happy! YEAH,

    ReplyDelete
  19. same error: Assertion failed :(

    ReplyDelete
  20. Confirmed to work in JBoss Developer Studio 5.01 (based on Eclipse 3.7)

    If JBDS was installed under root (i.e. under /usr/local/jbdevstudio) you need to copy the files as root and run JBDS/Eclipse once as root as well.

    ReplyDelete
  21. THANKS MAN. ITS WORKING.

    ReplyDelete
  22. Does anybody get some news about this annoying "assertion failed" bug ? :\
    I don't really want to remove coffee byte plugin, but this bug is really annoying.

    ReplyDelete
  23. Let me know the link to download com.cb.eclipse.folding_1.0.7.jar

    ReplyDelete
    Replies
    1. http://files.cnblogs.com/cruisoring/com.cb.eclipse.folding_1.0.7.zip

      Delete
  24. Thanks for posting this. Much appreciated.

    From my testing the plugin seems to work perfectly in 4.2.0 (Juno) too :).

    ReplyDelete
  25. Please anyone has an error fix?

    ReplyDelete
  26. Thanks a lot! It just works! :-D

    ReplyDelete
  27. Does't work with eclipse 4.2.0 Juno ,
    Nothing happened

    ReplyDelete
  28. Great post. Thank you
    If you feel lazy to even type region add this to
    Window -> Preferences -> Java -> Editor -> Templates

    Code:
    // region ${Name}
    ${line_selection}${cursor}
    // endregion ${Name}

    Implementation: Alt + Shift + H and then Select template.

    ReplyDelete
  29. Amazing THANKS so much using with Android Developer Tools Build: v21.1.0-569685. Works like a treat awesome job. Thanks very much for sharing

    ReplyDelete
  30. Great work, easy to use and reliable. love it!
    Thank you for sharing it with us, helped me a lot.

    ReplyDelete
  31. Doesn't work in kepler... There's no + sign to fold...

    ReplyDelete
  32. Nice product, the plugin works for me most of the time.

    However ,the plugin gives error when interpreting this source line:
    private String stringValue; //
    i.e. when an empty comment is after a closed Java element.

    Afterwards, the saved file cannot be re-opened in Eclipse. The error message: "Could not open the editor: String index out of range: 31"

    Exception details:
    java.lang.StringIndexOutOfBoundsException: String index out of range: 31
    at java.lang.String.charAt(Unknown Source)
    at com.cb.eclipse.folding.java.calculation.UserDefinedRegionHelper.isSentinel(UserDefinedRegionHelper.java:53)
    at com.cb.eclipse.folding.java.calculation.UserDefinedRegionHelper.isOpeningSentinel(UserDefinedRegionHelper.java:29)
    at com.cb.eclipse.folding.java.calculation.CommentHelper.isUserDefinedSentinel(CommentHelper.java:145)
    ...

    It seems that both version 1.0.6 and version 1.0.7 contain the original UserDefinedRegionHelper.java (in SVN trunk) and omits the fix added in revision r9 to SVN branch "fixes_04_09_27"

    The fixed version of the source file can be found here:
    https://code.google.com/p/coffee-bytes/source/browse/branches/fixes_04_09_27/src/com/cb/eclipse/folding/java/calculation/UserDefinedRegionHelper.java

    ReplyDelete
    Replies
    1. I've extracted jar from sources
      Available at http://www.damiencuvillier.com/doc/com.cb.eclipse.folding_1.0.6.jar

      You'll have to replace this file in eclipse/plugins folder

      Delete
  33. A million thanks, this works on Eclipse Juno SR2.

    ReplyDelete
  34. Works with Kepler too

    ReplyDelete
  35. works in adt-bundle-windows-x86_64-20130917 on win7/64!
    thank you!

    Robert

    ReplyDelete
    Replies
    1. Confirmed working with the latest ADT Bundle as well. Thanks a ton!

      Delete
  36. Would it be possible to add a "First Line Filtering" option for those of us who prefer C-style braces? (Both braces on their own line.) Never liked those hidden braces on the same line as the control statement.

    ReplyDelete
  37. you rock, thank you !

    ReplyDelete
  38. Thanks, even works in Eclipse on Windows 8.1!

    ReplyDelete
  39. Confirmed working in ADT v22.3-887826 OS X. Thanks very much!

    ReplyDelete
  40. I just installed this today with Eclipse Kepler (Eclipse IDE for Java Developers, Version: Kepler Service Release 1, Build id: 20130919-0819), and even the Version 1.0.6 of the jar seems to be working fine for region folding. Hope it stays that way :-)

    ReplyDelete
  41. It would be cool if only "name" was visible, not "[start] name".

    ReplyDelete
  42. Works great, except for 1 little issue:
    In the 'User Defined Regions' Tab in the settings, there's a 'Initially Collapse' checkbox that doesn't do anything.
    Either all blocks collapse or none do, depending on the 'Initially Collapse' setting in the 'General' Tab.
    (I'm using Kepler on Ubuntu)

    ReplyDelete
  43. Thank you. You helped me a lot.

    ReplyDelete
  44. I can confirm that it works on Kepler with Windows XP and EGit.

    ReplyDelete
  45. For those saying plus signs don't show up, make sure User Defined Regions (last check box on General tab) is enabled, then close and reopen the source code file. It works in IBM Rational Application Developer 8 on Windows 7, 64 bit.

    ReplyDelete
  46. I installed as you said but the option will not collapse the region. I must be doing something dumb.

    ReplyDelete
  47. Hello everyone. I faced with problem. I use eclipse 4.3_x64 for java. I download and put files into eclipse but there is now "Select folding to use" option at all in folding settings. I tried to run eclipse as administrator but it didn't helped. Does anyone know what is wrong?

    ReplyDelete
  48. According to Defenestrator May 5th it works with kepler, which is 4.3. I cannot seem to get it to work in 4.4 Luna, any suggestions? I tried several options:
    - /plugins
    - /dropins
    - various downloads, only te jar, a version with a plugin and a features folder etc.

    ReplyDelete
  49. Thank you very much for sharing this. Seems to be working fine in Eclipse 4.4 Luna (2014).
    All I did was to copy the contents from the features and plugins directories inside the tarball to the respective eclipse installation directories, then configure the plugin in the Preferences Window as advised in the post. Note that if you want regions defined with line comments like you can define in Intellij Idea, you have to name the regions both in the opening and in the closing tags.

    ReplyDelete

If you like this post, please leave a comment :)