Skip to Content
0

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

Jan 19 at 09:09 PM

164

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Matthew Billingham
Jan 20 at 07:47 AM
0

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.

Show 8 Share
10 |10000 characters needed characters left characters exceeded

I didn't find it in the context menu unfortunately :-(

0

Then it probably isn't possible. You could try asking on an eclipse specialist forum.

0
Matthew Billingham

I didn't know that something like this exists! Do you have a link?

0
0
Matthew Billingham

:-)

I thought you speak about an ADT-specific, SCN-hosted forum that I accidentally overseen.

Ok, I'll google it.

2

That's why I said "eclipse", not "adt" :-)

0

>ADT-specific, SCN-hosted forum

Yeah, would be nice if we had this! :-)

https://blogs.sap.com/2017/04/11/blogs-about-adt-abap-in-eclipse-hard-to-find-as-theres-no-tag/

0
Show more comments
Sergio Fraga Jan 25 at 01:00 PM
0

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

Show 1 Share
10 |10000 characters needed characters left 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

0
Vlad Ghitulescu Apr 06 at 12:42 PM
0

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?

Share
10 |10000 characters needed characters left characters exceeded
Thomas Fiedler
Apr 19 at 02:11 PM
0

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.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi, Thomas!

Could you put it on your feature request-list please?

I'm sure it would be useful not only for me: Sublime Text, Visual Studio Code, Xcode, BBEdit and other code editor have this since ages.

Thanks in advance!

Regards,
Vlad

0

Hi Vlad,

yes, we can do that. But most likely this feature will not be implemented within the next release.

Regards,

Thomas.

0