Try this. Run FB and open a source code file (like *.as). Right click in the left margin (where the "folding" icons show: plus, minus).
Look for the "Folding" submenu and experiment. I'm not sure what you mean by "auto" collapse, but if Folding is enabled, the left margin's + and - icons fold and unfold the code's methods.
Let me know.