I recently heard about Flex Formatter on the flexshow podcast . It is a tool that formats AS and MXML code, making a lot easier to read and follow. There is a doc describing how to use it here , but this is my quick review.
Installation, just like most eclipse plugins, is extremely simple. Just add the jar file to the eclipse plugins directory and restart. That’s it, you are ready to go. One of the first things you need to do is play with the options to customize it. Under windows > Preferences, you will see a new option for Flex Formatter. There is a nice preview window that shows you what your code will look like based on your options. Now to use it, you can highlight the text that you want formatted and select the indent icon from the tool bar, or what I usually do is just click Shift+Ctrl+F to format the whole file.
Flex Formatter also has a nice feature where you can import/export your setting from/to other developers on your team.
Be careful though when formatting XML (and I am not sure I am supposed to use it to format XML), because with my settings, it formatted
myValue
to
myValue
And it did that by adding a bunch of spaces, which caused an error. Had to go and modify some options to stop it from doing that.
All in all pretty nice tool, recommended.

Comments
Post new comment