Search

I'll be at


I support





Subscribe

Recent entries

Archives by subject

Archives by date

Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
30
Aug

Organizing imports in Flex Builder 2

Today I was working on refactoring code of a large Flex application.

Many files contained lots of imports at the top. I was looking for a quick way to organize my imports.

I did vaguely remember that there was on an option somewhere to organize the imports, but couldn't remember where to find it! Did all my right-clicks etc., but just couldnt' see it. I was almost about to move on, but then I found it!

In Flex Builder, click on Source > Organize Imports to organize imports alphabetically.

Even better, there is shortcut keys for it organizing imports.

On Windows: CTRL + Shift + o

On Mac: Apple + Shift + o.

Keep in mind that that imports can only be organized in this manner in Actionscript files only. (This will not work in MXML files.)

But overall, it works beautifully.

Comments

  • JabbyPanda's Gravatar JabbyPanda said:

    What we do for organizing imports in MXML files is a small trick - we cut all imports from MXML file into empty AS file, press On Windows: CTRL + Shift + o and then paste organized imports back into MXML file.

    Kinda hassle, but it works...