Collapse / Fold methods in Aptana?

2k Views Asked by At

I'm not sure if I'm missing something as I'm new to Aptana but. I'm having trouble collapsing my class methods. I like to collapse everything except the function I'm currently working in within my class but everytime collapse and then go to edit, everything expands again.

I'm guessing it's therefore some sort of feature that everything within a class is expanded when editing any method within the class. Is there any way around this at all. I'm loving Aptana so far, but this is extremely annoying.

2

There are 2 best solutions below

1
On BEST ANSWER

Like you this one has bugged me on and off for quite a while and it's even more annoying when I found out how stupidly simple the answer is. It's not written in any of the documentation that I can find.

But all you have to do is fold up all the methods, functions, classes etc that you want folded, then hit "ctrl s" to save. That's it. This step is not required in some other editors so it didn't occur to me immediately.

Thereafter if you hover over the + icon you get a preview of the folded up code. Obviously if you click on + the code expands. By the way: if you want to add to the items that can be folded:

select window -> preferences

either type "folding" in the type filter text box

or

select general -> PyDev -> Code Folding

check the appropriate items -> apply -> ok

1
On

For Mac, it's Shift-Command-/ using the / on the numpad

It doesn't work with the / next to the shift key.

I suspect this will work on PC, too.