Well Adobe did not provide the Flex Builder or Eclipse SDK plugin with a source code formatter (also known as Pretty Printer). To bad, because I really like nice formatted code. And I put a lot of time in fomatting my code.

Not anymore !!!!

From now on you can start using the Flex Formatter it’s a Flex Pretty Printer Tool.

This is an Eclipse editor tool to provide source code formatting for Adobe Flex code (i.e. Actionscript and MXML). The developer of this eclipse plugin provided a small set of formatting options which hopefully covers the most popular coding conventions.

You can download it here.

Installation is easy.
You should be able to just drop this plugin in the “plugins” dir (or “dropins” dir if you are using Eclipse 3.4 or greater) and restart Eclipse with the -clean argument.

How to use.
Basically, there are two command (format and indent) that have icons on the toolbar. 

flex-formatter-buttons

Select lines and click one or the other.  There are some options on a preference page.

About the author

Theo van der Sluijs Theo van der Sluijs (1975) is Lead Developer at Unitrust BV. He is also creator of "I Am Bored So I blog" / Gebruikmaar.nl / vanderSluijs.nl. He is a member of the Board of the Dutch Flex Usergroup and Goesweb.net. With his quote "Never Give Up, Never Surrender" (Actually stolen from Galaxy Quest) he fights his way through the day. Connect with him on Twitter.

VN:F [1.9.3_1094]
Rating: 8.3/10 (3 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
Flex Formatter, source code formatting, 8.3 out of 10 based on 3 ratings

Leave a Reply

QR Code
Donate

Like the information on my site? Please donate for a cup of coffee, or give a bit more for a cappuccino.

Twitter
Backlinks
Get Adobe Flash playerPlugin by wpburn.com wordpress themes