Slashdot Mirror


Eclipse Finally Gets Code Folding

binarysearch writes "Code folding is finally in the Eclipse project! After more than two years open, Eclipse's Bug 9355 has finally been marked FIXED. Code Folding was the most-voted for bug in Eclipse, with support for J2SE 1.5 features in a close second. Check out the I20040504 Integration build for folding in the Compilation Unit Editor (Class File Editor support is in HEAD). For those who dislike the implementation, it is requested that you create a new bug, rather than reopening 9355."

13 of 90 comments (clear)

  1. Code folding is: by Elwood+P+Dowd · · Score: 4, Informative
    Code folding is where you can collapse a block of code between a set of squirrely braces so it reads"
    { ... }
    or
    // ...
    or
    /* ... */
    Or whatever. Yes, this is like VS.NET and a million other IDEs. I use it all the time, but it never would have occured to me that it was a big deal. I figgered y'all FS/OSS types would use incremental search and brace matching to go anywhere in your code, rather than the scrolly-wheel. Isn't that what "real" programmers would do?
    --

    There are no trails. There are no trees out here.
    1. Re:Code folding is: by jpu8086 · · Score: 2, Informative

      Dreamweaver, Homewise, Bluefish: you do Java coding in it? Wow.

      Anjuta doesn't have it. I'm using it right now.
      Kate, I doubt it. It's a text editor.
      Vi doesn't.
      Emacs, I dont know.

      --
      now supporting:
      cmdrTaco for president '04
      michael for oval office intern summer '05
    2. Re:Code folding is: by BRSloth · · Score: 3, Informative

      Vi (as 6.2.x, at least) have code folding:

      Add in your .vimrc:
      set foldmethod = marker

      And, on your code, do comments like this: /* add function {{{ */
      void stuff(void)
      {
      weird_stuff();
      } /* }}} */

      use 'zc' to close the fold and 'zo' to open it. More info? :help fold

    3. Re:Code folding is: by FAT_VIRGIN · · Score: 3, Informative

      That's VIM, not vi.

    4. Re:Code folding is: by Anonymous Coward · · Score: 1, Informative

      Code folding was implemented in Xedit on VM/CMS at least twenty years ago, and probably earlier than that. Nice to see that Eclipse has finally caught up. It would be nicer if they organized their IDE so that I could use the editor I already have and know instead of having to use their inferior editor and wait for it to catch up.

  2. Re:Availability by Dr_Java · · Score: 5, Informative

    The M9 Build is scheduled for Friday May 21, 2004 - its hidden away in the documentation. Full release of 3.0 is scheduled for July 2004.

  3. Hint for Emacs Users by AT · · Score: 4, Informative

    I know this article is about eclispse, but I'd like to point out this feature exists in emacs, too.

    Turn on hs-minor-mode (M-x hs-minor-mode) and code blocks can be folded and unfolded with shift-middle-click (or C-c @ C-c).

  4. Re:Feature requests, not bugs? by Phil+John · · Score: 3, Informative

    Yes and no. Typically a lot of oss (and non oss) have one central place to track bugs and feature requests, it just makes it simpler for devs to check one source for what to do next.

    --
    I am NaN
  5. Re:code folding? by rmull · · Score: 2, Informative

    Depends what you use it for. If you're folding up method definitions, sure it's the same thing effectively. But there are other places where it helps a WHOLE lot - like when you're using a GUI builder that puts gobs of generated code in different places. Just set it up to fold over the auto-generation delimiters it puts in the file and you can read your code much more easily. I've used it for that in VS.NET, with the gui builder. Eclipse's VE works in very much the same way, so it should be very useful there.

    It also works well with any other application where you have a horde of boilerplate code that you want to ignore but don't want to or can't factor out.

    --
    See you, space cowboy...
  6. Re:Availability by plumpy · · Score: 2, Informative

    You have to go to "What's New History" and then scroll down to the Eclipse 3.0 plan.

    They keep updating it, but they never re-list it in the history for some reason, leaving it down in the news from last May.

    Here's a direct link.

  7. IDEA by tpv · · Score: 2, Informative

    For those who dislike the implementation, it is recommended that you use IntelliJ IDEA, rather than resubjecting yourself to a world of pain.

    --
    Read more of this story at Slashdot.Read more of this story at Slashdot.Read more of this story at Slashdot.
  8. Re:Feature requests, not bugs? by plumpy · · Score: 3, Informative

    They've been planning the 3.0 release for over a year, so they're not going to hold it up to get Java 1.5 support in.

    That said, 1.5 support is coming along and development versions can be installed as a plug-in (that link will also show you the current status).

    Once it's complete, I'm sure it will be included in an Eclipse point release. 3.0.2 or 3.1 or whatever.

  9. Re:Eclipse and C++ by Gill+Bates · · Score: 4, Informative

    Can anyone comment on how far the CDT has come in the last 12 months? Oh and also - is there any support for refactoring C++ yet :)

    Not very far, AFAIKT. I used it a couple of months ago for some JNI/C++ code I was working on, and found that although it looks a lot like the Java editor, it behaves vastly different.

    No code completion, no code formatting, no refactoring.

    Just a basic code editor with color syntax highlighting.