• Follow us on Twitter
  • Add me on Linkedin
  • RSS
A Boston native changing the web one application at a time... close

  • Home
  • About

Blog - Latest News

Code Formatting in Flash Builder

10 Comments/ in Flash Builder / by ryancanulla
May 17, 2011
Tweet

Follow these steps to set up automatic code formatting within flash builder.
Note that this is specific to your workspace so you should store the file somewhere on
your system and become familiar with the steps to initialize these tools.

The install process is the same as anyone installing plugins on Flash Builder.
If you are familiar with this process feel free to just utilize the links to the
software below.

Install Flex Formatter:

http://flexformatter.googlecode.com/svn/trunk/FlexFormatter/FlexPrettyPrintCommandUpdateSite/

1. Help>Install New Software
2. In the work with input use the URL and click add
Note – use the name Flex Formatter
3. Select Flex Formatter
4. Click next
5. Click next
6. Accept the term of use
7. Click Finish
8. Click okay if you get a message about installing unsigned software
9. Wait to restart flash builder.

Install Any Edit
In flash builder go to http://andrei.gmxhome.de/eclipse/

10. Help>Install New Software
11. In the work with input use the URL and click add
Note – use the name AnyEdit
12. Click on the dropdown for Eclipse 3.5-3.7 plugins
13. Select AnyEditTools
14. Click next
15. Click next
16. Accept the term of use
17. Click Finish
18. Click okay if you get a message about installing unsigned software
19. Restart Flash Builder

Flex Formatter setup
1. Download the formatting.properties file attached to this page. Store it
somewhere you can reference down the road.
2. Flash Builder > Preferences > Flex Formatter
3. Select the radio button to indent using spaces
4. Select import at the bottom and point to the file “formatting.properties”
5. Click on the Flex Formatter arrow in the left hand navigation
6. Select Auto Format
7. Check the box to format ActionScript files on save
8. Select the radio box “format” instead of indent for ActionScript files
9. Do the same for MXML files
10. Click Apply

Any Edit Setup
1. Flash Builder > Preferences > General > Editors > AnyEditTools
2. Check the box “remove trailing whitespace”
3. Check the box “create new line at the end of the file”
4. Check the box “Convert tabs <-> spaces
5. Click on the “Convert” tab in the tabbar navigation at the top
6. Change the Tabwidth/number of spaces for tab to 4 instead of 2
7. Click Apply

Change Flash Builder to use spaces instead of tabs
1. Flash Builder > Preferences > Flash Builder > Editors
2. Check indent using spaces at the bottom
3. Click Apply

UPDATE
Sorry about the delay! I’ve added the format.properties file to this blog post. You will need to remove the .txt extension to make it work. :-)

formatting.properties


← Developing for Multiple Screens with Flash Builder 4.5
First Unity Level →
Comments

10 Responses to Code Formatting in Flash Builder

  1. JWalker says:
    June 10, 2011 at 2:15 pm

    Thanks for the post, just one question:

    Download the formatting.properties file attached to this page.

    Attached where?

    Reply
  2. Kenny R says:
    June 21, 2011 at 8:50 pm

    It seems that the formatting.properties file has gone missing.

    Reply
  3. eco_bach says:
    July 6, 2011 at 7:06 pm

    where are the formatting.properties?

    Reply
  4. Ward says:
    July 12, 2011 at 3:07 pm

    Hey,

    Great posting, but I don’t see formatting.properties anywhere. Is there a link to download it?

    Thanks

    Reply
  5. Faisal says:
    July 28, 2011 at 9:34 pm

    Sorry, but I can’t find the formatting.properties file attached to this page :S

    Reply
  6. Tony Georigev says:
    August 17, 2011 at 11:27 am

    That’s really helpful!
    Although I was not able to find the attached formattin.properties … I’ve found one here: http://code.google.com/p/cortizone and it works great

    Reply
  7. Kevin says:
    October 4, 2011 at 6:52 pm

    Maybe I am blind, but where can I find the attached ‘formatting.properties’?

    Very good tutorial!

    Reply
  8. Alastair says:
    November 23, 2011 at 11:43 pm

    Unable to find your formatting.properties file on this blog post. Can you update it?

    Cheers!

    Reply
  9. ryancanulla says:
    May 1, 2012 at 8:27 pm

    Sorry everyone! My inbox was filled with spam comments so it took me forever to realize I was missing the file.

    Reply
  10. Nikolai says:
    February 11, 2013 at 6:23 pm

    It is strange not to see code formatting command in Flash Builder by default.
    Code formatting is indispensable to me.
    I`m happy to find Flex Formatter tip on your site.

    Thanks

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

*

*

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

328Follower
  • jetskiSimple Unity GameMay 17, 2012, 10:39 am
  • snowLevelFirst Unity LevelDecember 22, 2011, 1:19 am
  • fbLogoCode Formatting in Flash BuilderMay 17, 2011, 8:23 pm
  • fbLogoDeveloping for Multiple Screens with Flash Builder 4.5May 17, 2011, 3:53 am
  • 554px-Apache-Ant-logoAutomate your staging builds with FTP SFTP & AntMay 10, 2011, 4:31 pm

Latest Tweets

ISBN: 1449339387
ISBN: 0596517742
ISBN: 978-0321683915

Interesting links

Besides are some interesting links for you! Enjoy your stay :)

Pages

  • About

Categories

  • Automation
  • Flash Builder
  • Uncategorized
  • Unity

Archive

  • May 2012
  • December 2011
  • May 2011
  • December 2010
  • November 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
© Copyright - ryancanulla.com - Wordpress Theme by Kriesi.at