Skip to Content

How to fold / collapse selected code in Eclipse & ABAP Development Tools

Hello!

How do you fold / collapse a selected part of your code in the editor window in Eclipse & ABAP Development Tools?

I don't want to fold only the part specific to a statement (IF, WHILE etc.) that's already marked by a + sign in a circle but a portion of the code that I select (with the mouse or the cursor and the arrow keys).

Any idea?

Thanks!

Regards,
Vlad

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Jan 20 at 07:47 AM

    It's possible with some editors in Eclipse, but unless you see the option in the context menu, I don't think it's available in the ABAP editor.

    Add comment
    10|10000 characters needed characters exceeded

    • I didn't dare to ask about it (I already ask too much ;-) but yes, it's totally different organized than one would normally expect: I wasn't able to find a dedicated forum for ADT or a dedicated tag (Eclipse come with BW SAP HANA Modeling Tools as a prefix - there's nothing I do now, while using Eclipse! & no tag at all for ADT), or at least a detailed search where one can filter only ADT or similar.

  • Jan 25 at 01:00 PM

    CRTL NUM PAD + Folds a block of code

    CRTL NUM PAD - Collaps a block of code

    CRTL SHFT NUM PAD / Folds all code

    CRTL SHFT NUM PAD * Collaps all code (This one doesn't work for me)

    Window -> Preferences -> Type Keys

    Add comment
    10|10000 characters needed characters exceeded

    • Hi, Sergio!

      I have no NumLock on my keyboard, so I've changed the keyboard shortcut to something else (now I know how! ;-)

      However that doesn't do what I want (collapse ONLY the selected text) but instead collapses the content of the statement (as the small pluses in the circle in the gutter left do).

      Thanks nevertheless!

      Regards,
      Vlad

  • Apr 06 at 12:42 PM

    I've found a discontinued, non-working plugin for this, so I suppose I'm not alone (heck, there are editors that support something like this)... Do you have a workaround for this?

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 19 at 02:11 PM

    Hi Vlad,

    I'm not aware of such a plugin. In ADT we do not offer that kind of free style code folding.

    Regards,

    Thomas.

    Add comment
    10|10000 characters needed characters exceeded