phpideaptanacode-folding

Collapse / Fold methods in Aptana?


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.


Solution

  • 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