This is not possible in FlashBuilder 4.7. However if you are tenatious enough, you can work around the problem as I did:
- Associate
.as
files with your FlashBuilder workspace. FlashBuilder->Window->Preferences->Flash_Builder->File_Associations and click ActionScript Files (*.as).
- Identify all .as files in your project and open them in Builder. I did this with cygwin, using this command:
find . -type f -name '*.as' -exec cygstart {} ';'
- Use a macro program to type Control-Shift-O, Control-S, Control-W to: organize imports, save file, close file.
- Setup your macro to loop.
One warning, FlashBuilder takes a little time to organize the imports, and if your macro types too fast much of it will get lost, and bad things will happen in the source code. Put delays into your macro so that FB has time to catch up with the organizing, saving, and closing of files. I used 200ms between each step in the macro and it worked fine. I just launched the macro, and went to have some lunch.