cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

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

Vlad_Ghitulescu
Participant
8,418

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

Accepted Solutions (0)

Answers (5)

Answers (5)

arthur_rupp
Newcomer
0 Likes

its old..i know..but any news here??

Vlad_Ghitulescu
Participant
0 Likes

It's still not there with the newest Eclipse & ADT

ThFiedler
Product and Topic Expert
Product and Topic Expert
0 Likes

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.

Vlad_Ghitulescu
Participant
0 Likes

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

ThFiedler
Product and Topic Expert
Product and Topic Expert

Hi Vlad,

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

Regards,

Thomas.

Vlad_Ghitulescu
Participant
0 Likes

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?

sdfraga
Participant
0 Likes

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

Vlad_Ghitulescu
Participant
0 Likes

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

matt
Active Contributor
0 Likes

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.

Vlad_Ghitulescu
Participant
0 Likes

I didn't find it in the context menu unfortunately 😞

matt
Active Contributor
0 Likes

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

Vlad_Ghitulescu
Participant
0 Likes

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

matt
Active Contributor
0 Likes
Vlad_Ghitulescu
Participant

🙂

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

Ok, I'll google it.

matt
Active Contributor
0 Likes

That's why I said "eclipse", not "adt" 🙂

joachimrees1
Active Contributor
0 Likes

>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/

Vlad_Ghitulescu
Participant

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.