PureMVC Architects Lounge

Announcements and General Discussion => General Discussion => Topic started by: Jason MacDonald on June 05, 2009, 08:52:37

Title: Flex Code Formatter
Post by: Jason MacDonald on June 05, 2009, 08:52:37
It always drove me nuts that I couldn't control the default way Flex formats it's code. I've always coded by putting bracers on the same line as the method, class etc. I decided to do some searching and found this[1] eclipse plugin. I don't know how I survived before without it! It works perfectly and is highly configurable. Just thought I'd make a mention of it incase others have the same problem as I did.

[1] http://sourceforge.net/project/platformdownload.php?group_id=248408

Title: Re: Flex Code Formatter
Post by: Ondina on June 07, 2009, 02:40:08
Hey Jason,
Thanks for   the  tip.
I’ve just installed the Flex Formatter.  Very cool features!  Especially  the mxml options .
The  formatting of actionscript code works fine inside of  actionscript files and classes, but I can’t make it work inside of a Script tag.
EDIT:I’ve tried Flex Formatter with Adobe Flash Builder 4. In FlexBuilder 3 it works fine inside of a <mx:Script></mx:Script>  tag.
The problem seems to be  the new  fx prefix. Obviously  Flex Formatter  doesn’t recognize  the <fx:Script> . Actually something to be reported on their forum, if I wasn’t so lazy.
Anyway I’m wondering how the Fx-prefix and the new namespaces will affect the porting of my apps from Flex3 to Flex4  FlashBuilder4…

Title: Re: Flex Code Formatter
Post by: mldj on June 27, 2009, 11:10:05
I still don't have any idea about the backwards compatibility with Flex 3, after the new controls will be much more layout-customizable. One thing seems sure - porting apps to the Flash Builder will be more of a pain in the neck than porting Flex 2.0.1 to Flex 3. Thank god I'll be doing the Objective-C port ;)

As for the code beautifier, after I've coded for only two years according to that convention, I got used to it and now it's much more difficult for me to read through code with C++ styling: opening brace at the same line, etc.