The easiest way to bring all the code from the different tabs together (if they are pure Processing code) is to export your sketch. Then you can visit the exported folder, search for the .java file generated. Keep in mind that Processing can also handle .java files in its tab system. These Java files are not merged in the exporting process as they are considered top classes.
For folding text in the editor, I don’t think it is possible at the moment. It is a nice feature request.
I would like to add that there is a tab manager tool, in case this could be of any use for your current work flow.
Kf