« Realaxy
» PerspectiveProjection + MouseEvent

General

Flex Formatter

12.22.09 | Written by: Scott
Scott

I have recently started using an nifty utility called Flex Formatter.  I saw a blog post about it on Grant Skinner’s blog.  I was initially skeptical that it wouldn’t to much more than what the formatter in FDT is capable of.  I was wrong.  It does a lot more than the FDT formatter.  Unfortunately I could not install the plugin the way which Grant described in this post (which is the normal way of installing plugins in Eclipse).  Instead I had to download the jar files and stick them in the plug-ins folder for Eclipse.  If you go Christophe Herreman’s blog, he provides a link to the jar files.  Once you download them (there are 3 .jar files in the zip), move them into the plug-ins folder where you have your Eclipse installation.  Once you restart Eclipse, you will see the Flex Formatter buttons at the top of Eclipse.  Then you can go into preferences and start editing how you like to format your code.

It is quite powerful.  It has a lot more features than the formatter that comes with FDT.  One of the things I like is that it can rearrange all my methods and properties of my class (in ActionScript classes) so they are in alphabetical order.  And it arranges them together by public, protected, internal, and private.  It’s pretty sweet.  It also formats your mxml files.  This ability didn’t exist in Flex Builder or FDT.

But there is a downside.  Flex Formatter is a bit frustrating sometimes.  For some reason it doesn’t always work.  Specifically on some of my custom ActionScript classes.  When I try to format, it won’t do anything.  I am using PureMVC in my projects and when I try to format any Mediator or Proxy classes that it does not want to work.  So the work around I do is copy the code into a new class and format it, copy the formatted code, paste it back into my original class, and delete the new class.  This is a pain, but it works.  Has anyone else run into this problem?

Tags: ,

3 Comments

have your say

Add your comment below, or trackback from your own site. Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

:

:


« Realaxy
» PerspectiveProjection + MouseEvent